Dynamically changing title of 'Application Menu'
Dynamically changing title of 'Application Menu'
- Subject: Dynamically changing title of 'Application Menu'
- From: nick briggs <email@hidden>
- Date: Wed, 26 Oct 2005 15:20:53 +0100
Hi
I am trying to dynamically set the title of my apps 'Application
Menu' based on compile flags.
In my app delegates applicationDidFinishLaunching method I perform
the following :
NSMenuItem *item = [[NSApp mainMenu]itemAtIndex:0];
[item setTitle:__CLIENT_NAME__];
Which has no effect. However if I change the code to address the
'File Menu' then the title is updated as expected.
NSMenuItem *item = [[NSApp mainMenu]itemAtIndex:1]; <--
changed index
[item setTitle:__CLIENT_NAME__];
Further more if I call my original code at some arbitrary point (once
the app has finished launching) the menu still fails to update.
How do I override this AppKit behavior?
Thanks
Nick
_______________________________________________
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