Stopping menus appearing on 10.2
Stopping menus appearing on 10.2
- Subject: Stopping menus appearing on 10.2
- From: Mike Davis <email@hidden>
- Date: Sat, 14 Sep 2002 20:13:21 +0100
Hi, perhaps some one here can help me find a solution to a problem I
have...
I have an application which shows a window and a number of alerts -
pretty trivial so far. The problem is that it must execute before
NSApplicationMain() is called.
To do this, I instantiate an instance of NSApplication using
[NSApplication sharedApplication]. This, as you know, kicks in all the
GUI stuff and initializes NSApp and so on. From that point on, I'm able
to put up my GUI before NSApplicationMain().
The problem is that on 10.2, when I enter the runloop in
NSRunAlertPanel() and the other modal methods in NSApplication, an
application menu appears next to the Apple menu along with a help menu.
I've not loaded up the main nib for the application and it seems that
the behavior of NSApplication is odd. It's at least different to the
10.1.5 behavior which did nothing.
What's even odder is if I specify a null menu with setMainMenu: or
setApplMenu:, in NSApplication, the messages seem to be ignored and
AppKit insists I have these menus in there. I even tried to have it use
an empty menu, as opposed to nil, and it made no difference.
I might add that these menus cause me a problem because they are not
wired up (according to the console) and I end up with *two* help menus
appearing in the application when I allow NSApplicationMain() to run.
Anyone got an idea of a work around for this to stop the runloop
putting the menus up? Isn't it rather presumptious of NSApplication to
assume I want a menu at all?
I can knock up a demo app if someone wants to take a look at it...
Mike.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.