Re: Application launch from plugin
Re: Application launch from plugin
- Subject: Re: Application launch from plugin
- From: Damien Bobillot <email@hidden>
- Date: Tue, 5 Jul 2005 17:52:45 +0200
Le 5 juil. 05 à 17:43, Laurent D. Michel a écrit :
On Tue, 2005-07-05 at 17:20 +0200, Damien Bobillot wrote:
Le 5 juil. 05 à 00:01, Laurent Michel a écrit :
> - It calls _objcInit()
> - It calls NSApplicationLoad() (return value is true)
> - It calls app = [NSApplication sharedApplication]
> - It uses [NSBundle loadNibFile ... ] to load a nib file
> - It calls [app run]
Did you try to use NSApplicationMain() directly ? It does all this
and things you'll forgotten in a single call.
Yes, I tried. But it wouldn't find the NIB file since the
application is a normal console app (no packages as a <foo.app>
with a resource directory inside) so it would not be able to locate
anything (and this is indeed what it complains about). I need to be
able to specify my own nib with the application window. If there is
a way to do this while calling NSApplicationMain, I'm all ears.
(maybe in one of the applciation notifications ?)
Also try to replace "app" by "NSApp" : NSApp is a global variable
automatically setup by NSApplicationMain. It must contains the
application object, and in your example it may be set to its default
value, nil.
Thanks for the tip (didn't know about that global). It did not work
though (I made sure that the pointer was fine with a printout)
Behavior has not changed:window is responsive but 'not active'.
Have a look at the code of the VLC plugin containing the Mac OS X
interface code, it's exactly the same situation : vlc is a non-GUI
program, GUI are provided through plugins.
http://www.videolan.org/vlc/download-sources.html
--
Damien Bobillot
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden