Mac OSX : existing objective-c app in a wxDialog

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
briceandre
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 672
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Mac OSX : existing objective-c app in a wxDialog

Post by briceandre »

Dear all,

I would want to integrate a scanner interface to my MAC application, but as I am a noob with cocoa stuff, I looked on internet for an example. I found an application that nealy does what I want, but it's a xcode project implemented in objective-c and written as a standalone application (https://github.com/darcyliu/CocoaSample ... nerBrowser).

Now, I would want to integrate this code in my application, but not as a separate app, but directly within a wxDialog. But I am a bit confused on how to perform this. I first checked the main entry of the program, hoping to be able to call the same code from a wxDialog, but here is the content of this main function :

Code: Select all

int main(int argc, char *argv[])
{
    return NSApplicationMain(argc,  (const char **) argv);
}
The only other class provided in the code is called AppController, and I do not see any matching to this class from the main function. Thus, I have no idea of how this class is invoked from this program (but I am not really interested in that), but moreover, I have no idea on how I would be able to invoke the AppController class from a wxDialog context, if I integrate it in my application wxWidgets application.

Any idea on how to perform that ?

Regards,

Brice
Post Reply