Search found 85 matches
- Feb 14, 2021 21:09
- Forum: Community Discussion
- Topic: Shorthand for setter/getter hell
- Replies: 3
- Views: 730
Re: Shorthand for setter/getter hell
Properties are of limitted value in such cases (only ever a single value handled). They can be substituted with one's own handlers, like below example: ' This code works Type MyObject Public: declare Sub SetO(ByVal Val_x as UInteger, ByVal Val_y as UInteger) declare Function GetO(ByVal mode As ULon...
- Feb 14, 2021 19:03
- Forum: Community Discussion
- Topic: Shorthand for setter/getter hell
- Replies: 3
- Views: 730
Shorthand for setter/getter hell
Has Freebasic an undocumented shortcut for the getter / setter hell? If you create an object and it has values that you want to make changeable, you will have to define properties. Nothing wrong with that, but it gets boring when the only thing you do is Assign and return. What would be really dev f...
- Feb 13, 2021 17:55
- Forum: General
- Topic: So whats up with arrays
- Replies: 26
- Views: 2011
Re: So whats up with arrays
My assumption would be that with dynamic arrays, the descriptor remains static and the fields pointed to change. But then, its an assumption.
- Feb 13, 2021 17:36
- Forum: General
- Topic: So whats up with arrays
- Replies: 26
- Views: 2011
Re: So whats up with arrays
@All, thanks
The last example hammered my requirement.
That saves a lot of work.
Haven't tried it yet though.
The last example hammered my requirement.
That saves a lot of work.
Haven't tried it yet though.
- Feb 13, 2021 14:51
- Forum: General
- Topic: So whats up with arrays
- Replies: 26
- Views: 2011
So whats up with arrays
My observations on arrays is that its still a pain. If I try to use an array in an object I still need to make a some kind of copy of the array inside the object because the compiler allows for a reference to the descriptor but I can not store that reference for later use. Using VARPTR or CPTR on th...
- Mar 22, 2020 8:13
- Forum: Linux
- Topic: Linux Framebuffer
- Replies: 9
- Views: 2862
Re: Linux Framebuffer
Thanks for your replies. The screen boots if FB mode. I discovered that I have a rights issue. The FB device needs root rights. So dim as integer X,Y,D ScreenRes X,Y,D Print X,Y,D Sleep gives as result 1024 768 32 after running with sudo. However graphical operatiions have no visible result.. So thi...
- Mar 19, 2020 8:22
- Forum: Linux
- Topic: Linux Framebuffer
- Replies: 9
- Views: 2862
Re: Linux Framebuffer
Via screencontrol you could try to set the driver FBDev , see: https://freebasic.net/wiki/wikka.php?wakka=GfxLib But that does not seem to work here. It defaults to X11. There is discussion of fbdev in https://freebasic.net/forum/viewtopic.php?f=5&t=24793&hilit=fbdev&start=90 Hi and tha...
- Mar 18, 2020 22:17
- Forum: Linux
- Topic: Linux Framebuffer
- Replies: 9
- Views: 2862
Re: Linux Framebuffer
After reading this Direct Rendering Infrastructure and this Direct Rendering Manager wikipedia article, I think that the term "the framebuffer" is a bit vague. No application (except the DRM) can (is allowed to) write to the video memory directly. If I understand correct, your application...
- Mar 18, 2020 14:01
- Forum: Linux
- Topic: Linux Framebuffer
- Replies: 9
- Views: 2862
Linux Framebuffer
Hi All, There is something I try to understand. I am trying to write a program that uses the framebuffer. Freebasic seems to support the framebuffer but how? Each time I try to do something graphical, the compiler starts to complain that it needs libXPM (an X windows component). Including fbgfx.bi d...
- Apr 13, 2018 10:06
- Forum: General
- Topic: Access inside objects
- Replies: 18
- Views: 1936
Re: Access inside objects
''App->CanvasHandle=@CVAS App->CanvasHandle=CVAS '' CVAS is already a pointer Thanx, this one is really obvious when you realize it... Setting the address to the pointer of the pointer too the object. That might explain some strange behavior.Because all operations after that happen in memory addres...
- Apr 13, 2018 8:46
- Forum: General
- Topic: Curious from a performance perspective
- Replies: 26
- Views: 3300
Re: Curious from a performance perspective
Python it's a modern well written language and used C++ code under the hood today. My point was that even a language considered "slow" can produce fast applications, simply because the routines that do a lot of legwork, like sorting, can be written in C or assembler. So if FB is "slo...
- Apr 13, 2018 7:06
- Forum: General
- Topic: Access inside objects
- Replies: 18
- Views: 1936
Re: Access inside objects
This part is suspicious: GridStr [ ((Yr-1)*Cwijd)+Xr ] Cwijd is -2791790 when printing "H" of "Hello" Do some min/max checks here. Probably anything that uses [ ] is suspicious. I don't think freebasic range checking (with -exx) does not work for this. Probably safer to use redi...
- Apr 13, 2018 6:42
- Forum: General
- Topic: Access inside objects
- Replies: 18
- Views: 1936
Re: Access inside objects
Yes, boundary checking is crucial when working with memory addresses. What I am missing at this point is a decent IDE that supports me. The only way I can debug if by placing print statements followed by sleep, before and after the line of code I want to check. That really sucks because I spend more...
- Apr 12, 2018 18:37
- Forum: General
- Topic: Access inside objects
- Replies: 18
- Views: 1936
Re: Access inside objects
Could you compile your program with the option -exx, then execute the file.exe from a command window in order to can intercept an eventual run-time error message. Remark: For the future fbc update, replace "Inkey$" by "Inkey" (three times). Yeah, in the 80ties I did something wi...
- Apr 12, 2018 17:58
- Forum: General
- Topic: Access inside objects
- Replies: 18
- Views: 1936
Re: Access inside objects
Thanks all. Below is my code, its slightly more complex then the previous example. It compiles and crashes. Responsible code "RootHandle->GPrint "Hello World". Somehow when calling the GPrint method of the object referred to by RootHandle (type View Ptr) doesn't work from inside anoth...