How are BlitzMax and Cocoa structured?

BlitzMax Forums/BlitzMax Programming/How are BlitzMax and Cocoa structured?

JoshK(Posted 2011) [#1]
I'm pretty perplexed by Cocoa's structure and was wondering how BlitzMax is able to pull it off. It seems Cocoa works like this:

Cocoa app Run()
{
<Run my own code here>
}

I mean, you can't just go calling Cocoa commands and have it work. Then how the heck does MaxGUI handle it so easily? You don't have to put all your BMX code in a callback or any such nonsense.

Also, is it possible to to compile an .a file with BMX for OSX that other language can use? I could maybe get around this problem if I just compiled some of the MaxGUI source into a BMX lib.


SebHoll(Posted 2011) [#2]
I remember looking into this for you. I could only find yucky hacks... :-/


JoshK(Posted 2011) [#3]
It appears at this point the user has to have an objective C entry point, which breaks my goal of cross-platform C++ code without macros. However, you can use macros to change the name of the C++ main() function, and have the Obj-C function call it. I'm really scared at how this is going to work with BMX.