• 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: sender is NSApp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dock menus: sender is NSApp


  • Subject: Dock menus: sender is NSApp
  • From: "Erik J. Barzeski" <email@hidden>
  • Date: Fri, 26 Oct 2001 16:07:36 -0400

Hi,

I'm glad that I can easily imlement a Dock Menu in Cocoa with:

- (NSMenu *)applicationDockMenu:(NSApplication *)sender

Unfortunately, there's a DRASTIC oversight in the current Dock Menu
implementation.

My implementation of the method above creates x menu items. Why x items?
Because I have one menu item for each file in a particular directory.

Of course, each of these menu items is given the same action (and a
different tag). I assigned their selector using the below method:

[thisMenu insertItemWithTitle:itemName action:mySelector keyEquivalent:@""
atIndex:i]

Of course, big freaking problem: there's absolutely no way to figure out
which menu item was selected, huh? Ooops. I'd call that a bug... Or at the
very least a really big oversight...

Any way, if you've got a work-around, I'd love to hear it, because the ones
I've heard so far are pretty, uhh, "interesting."


--
Best wishes,
Erik J. Barzeski

Imagination is more important than knowledge - Albert Einstein
*******************************************************************
Email: erik@(anything below)
AIM: iacas ICQ: 8186546

http://barzeski.com/ http://weims.net/
http://techstra.net/ http://cocoadevcentral.com/
http://soundsetcentral.com/ http://applescriptcentral.com/
*******************************************************************


  • Prev by Date: You're Invited to Mac OS X USER EXPERIENCE/HI DESIGN Workshops
  • Next by Date: How to find a process and bring it to front
  • Previous by thread: You're Invited to Mac OS X USER EXPERIENCE/HI DESIGN Workshops
  • Next by thread: Re: Dock menus: sender is NSApp
  • Index(es):
    • Date
    • Thread