Windows system tray
BlitzMax Forums/Brucey's Modules/Windows system tray
| ||
Hey, I'm currently playing around with BMX-NG for a MaxGUI project of mine, and I've got a couple of modules for the system tray in windows - however they do not compile :/ I get the error atm "Only string, arrays and pointers may be indexed." on this code: Function OpenObjHandle ( obj:Object ) ( Int Ptr Ptr Varptr obj ) [ 0 ] [ 1 ] :+ 1 '<--- this line Return ( Int Ptr Varptr obj ) [ 0 ] + 1 EndFunction Why do I get this error? and what can I do to fix it? (I'm compiling for 32-bit) Thanks, -- Thareh |
| ||
I think Brucey will have to update BCC to handle that... PS: Without brackets this "int ptr ptr varptr" looks really hm... hard to understand at the first glance :-) bye Ron |
| ||
I don't know if this does the sameFunction OpenObjHandle ( obj:Object ) Local a:Int Ptr Ptr= Int Ptr Ptr obj a[0][1] :+ 1 ' increase a "usage" counter ? Return (Varptr a[0]) + 1 EndFunction |
| ||
What are you trying to do exactly? If you are trying to "cheat" the garbage collector by applying your own reference counting to it, I'm afraid that NG doesn't work like that - because it uses a different GC. The internal structure of objects is different. There are macros (at the C level) you can use to do this properly : BBRETAIN(obj) and BBRELEASE(obj) So, it's probably better for you to write some glue code which would work across all versions. Also, what are you trying to return? |