Menu Delegate methods: Lazy or non-lazy Precedence?
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