| [platform-swt-dev] What is OS.JNIGetObject for in SWT Cococa? |
| Hi I'm porting SWT Cocoa to the D programming language and I have some problems with a few methods. The question I guess is what are the following methods for and how to they all fit together: OS.NewGlobalRef OS.DeleteGlobalRef OS. JNIGetObject setTag tag Both in NSControl and some other classes. I guess that NewGlobalRef and DeleteGlobalRef are JNI API functions. The only thing OS. JNIGetObject seems to do is casting a number to an Object. It seems that SWT are keeping track of all/some (native/cocoa?)objects and mapping them to a number. If SWT are in full control of setting and getting the numbers/tags then I guess I could have a data structure and store all the numbers and objects in. Then OS.NewGlobalRef, OS.DeleteGlobalRef and OS. JNIGetObject would work against the data structure and inserting, getting and deleting objects. /Jacob |