Re: NSApp's run method and menus...
Re: NSApp's run method and menus...
- Subject: Re: NSApp's run method and menus...
- From: j o a r <email@hidden>
- Date: Sun, 15 Jul 2007 15:24:09 +0200
On Jul 15, 2007, at 2:05 PM, Jeff Bland wrote:
If I don't call [NSApp run] the menu's do not show up other than the
apple
menu and the menu with the application name. If I do call [NSApp
run], they
work perfectly. My application employs it's own event loop because
it needs
to retain program control (ie it doesn't wait for user input or some
event
to do something - it needs to do constant processing).
I don't think that you have provided a good argument as to why you
couldn't use the standard way to start and run your application. I
also doubt that you would need a custom event loop. It sounds to me
like you base this design on experiences from some other programming
environment? Also note that parts of Cocoa, and in particular AppKit,
depends on the presence of a working NSRunLoop.
I would suggest that you use the standard machinery and wait for the
NSApplicationDidFinishLaunchingNotification, or delegate callback, as
the point where you start your own processing, and then use either
threads or timers to perform your work.
Cheers,
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden