• 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
Re: Efficient hierarchical menu from path?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficient hierarchical menu from path?


  • Subject: Re: Efficient hierarchical menu from path?
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 14 Dec 2007 13:22:13 -0800


On 2007 Dec, 13, at 22:59, j o a r wrote:

While I haven't tried this myself it seems that you should be able to dynamically create only the parts of the menu that the user actually navigates to. You might be able to do that by leveraging the the "-menuNeedsUpdate:" NSMenu delegate method

Yes, it will work for that.

(and please see the discussion in the docs for that method for additional considerations).

and also be aware that there is a bug in Tiger/Panther: Submenus are leaked, which causes a hell of a mess including long pizza wheels and mysterious crashes when they send messages to other deallocced objects. I worked around this in my subclass of NSMenu, in -dealloc, by looping through all NSMenuItems in -itemArray and sending each a setSubmenu:nil.


This bug has been fixed in Leopard.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Efficient hierarchical menu from path?
      • From: "I. Savant" <email@hidden>
    • Re: Efficient hierarchical menu from path?
      • From: John Stiles <email@hidden>
References: 
 >Efficient hierarchical menu from path? (From: Justin Hawkwood <email@hidden>)
 >Re: Efficient hierarchical menu from path? (From: j o a r <email@hidden>)

  • Prev by Date: Re: Need just a little more Interface Builder assistance
  • Next by Date: NSString componentsSeparatedByString returned memory
  • Previous by thread: Re: Efficient hierarchical menu from path?
  • Next by thread: Re: Efficient hierarchical menu from path?
  • Index(es):
    • Date
    • Thread