menu question
menu question
- Subject: menu question
- From: Maxwell Robertson <email@hidden>
- Date: Sun, 12 Jun 2005 22:19:37 +0100
Under the old OS we had MBAR resources where you could define different menus and load them as needed.
Is it possible to do this with Cocoa and IB?
For example you have an application when it launches you see the MainMenu defined in the default MainMenu.nib.
However your App has a different mode of working that involves switching all menus, the classic being Paint and Draw modes.
I want to replace all menus then switch back as needed - note the new menu is based on data the user has entered.
I can step down the menus and delete them and add new ones but it seems like a lot of work.
I have still to figure out how to reload the MainMenu from the Nib once more. After deleting and then adding new menus, restoring the original with
NSMenu *newMenu = [[NSMenu alloc] initWithTitle:@"MainMenu"];
[NSApp setMainMenu:newMenu];
results in an empty menu with only the Apple Menu being present.
Any advice would be appreciated. (Modifying menus and deleting and editing them are fine.)
Be kind I am in the process of getting up to speed with Cocoa and Xcode. (And have purchased the current relevant texts from Amazon.)
Max.
_______________________________________________
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