Re: Dock menus
Re: Dock menus
- Subject: Re: Dock menus
- From: Andre Bocchini <email@hidden>
- Date: Sun, 3 Aug 2003 23:12:23 -0500
Is the class that has your applicationDockMenu method you app delegate?
If not, trying making it so. That should clear up the problem.
-- Andre
On Sunday, August 3, 2003, at 09:36 PM, April Gendill wrote:
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.
_______________________________________________
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.
References: | |
| >Dock menus (From: April Gendill <email@hidden>) |