Dock menus
Dock menus
- Subject: Dock menus
- From: April Gendill <email@hidden>
- Date: Sun, 3 Aug 2003 19:36:55 -0700
appDockMenu was declared in the header as an NSMenu.
there is no nib file for the dock since most of the examples do not
have a nib
this program is small enough not to need a seperate controller for this.
there is no docmenu in the mainmenu nib either because again most
examples don't have them
so why, even if I do a direct cut and paste, does this not work?
is applicationDockMenu suppose to be called from the awakefromnib or
the init????
what is wrong with my code that even working code will no longer work
in my app?
- (NSMenu *)applicationDockMenu:(NSApplication *)sender
{
NSMenuItem *newItem;
appDockMenu = [[[NSMenu alloc] initWithTitle:@"DockMenu"]
autorelease];
newItem=[[[NSMenuItem alloc]initWithTitle:@"Test"
action:@selector(executeMenu:)
keyEquivalent:@""]autorelease];
[newItem setTarget:self]; //set to self because
executemenu is a valid ibaction in the main controller.
[appDockMenu addItem:newItem];
return appDockMenu;
}
_______________________________________________
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.