• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Dock menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Dock menus
      • From: Andre Bocchini <email@hidden>
  • Prev by Date: Re: [ObjC newbie]: dereferencing pointer to incomplete type
  • Next by Date: Re: First slow, then fast
  • Previous by thread: Re: Help: Waiting for other thread to finish?
  • Next by thread: Re: Dock menus
  • Index(es):
    • Date
    • Thread