• 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
Contextual menus : better idea?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Contextual menus : better idea?


  • Subject: Contextual menus : better idea?
  • From: Stephane <email@hidden>
  • Date: Wed, 6 Dec 2006 10:19:18 +0100

I need to add contextual menus to a list of different types of items. Depending on the type of item, the contextual menu is different (as can be seen in Xcode when you control click on a file or a folder in the Groups & Files list).

My current implementation is not too bad. I subclassed NSTableView and changed - (NSMenu*) menuForEvent: (NSEvent*)event; so that it can requests the NSMenu from its delegate. This lets me return a specific menu for one item.

Question:

Is there a more "official" way of doing this?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Contextual menus : better idea?
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: NSRulerView Subclass and drawHashMarksAndLabelsInRect:(NSRect)rect;
  • Next by Date: [Solved] Re: Synchronizing Thread Execution
  • Previous by thread: NSRulerView Subclass and drawHashMarksAndLabelsInRect:(NSRect)rect;
  • Next by thread: Re: Contextual menus : better idea?
  • Index(es):
    • Date
    • Thread