• 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
Menu Delegate methods: Lazy or non-lazy Precedence?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Menu Delegate methods: Lazy or non-lazy Precedence?


  • Subject: Menu Delegate methods: Lazy or non-lazy Precedence?
  • From: Jerry Krinock <email@hidden>
  • Date: Wed, 24 Feb 2010 17:45:03 -0800

If the delegate of an NSMenu implements both the lazy-populating methods:
    numberOfItemsInMenu:
    menu:updateItem:atIndex:shouldCancel:
as well as the non-lazy populating method
    menuNeedsUpdate:

Which one gets the delegate messages?

Yesterday I found that it was the non-lazy method, but today, in a different situation, it seems to be the lazy methods.  Can't find the answer in "NSMenuDelegate Protocol Reference" or "Application Menu and Pop-up List Programming Topics for Cocoa".

I conclude that it's undefined, so the programmer must be careful that a menu delegate, including any available categories, only implement one or the other.

Does anyone have a different experience?

_______________________________________________

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

  • Prev by Date: Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .
  • Next by Date: Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .
  • Previous by thread: [end of thread] Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .
  • Next by thread: Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .
  • Index(es):
    • Date
    • Thread