Re: Reason for menuNeedsUpdate notification?
Re: Reason for menuNeedsUpdate notification?
- Subject: Re: Reason for menuNeedsUpdate notification?
- From: Eric Schlegel <email@hidden>
- Date: Fri, 23 Apr 2010 09:09:08 -0700
On Apr 23, 2010, at 8:31 AM, David Reitter wrote:
> How would I go about determining the reason for a menuNeedsUpdate notification?
On 10.6, you can use -[NSMenu propertiesToUpdate] from within your menuNeedsUpdate delegate to determine what aspects of the menu need to be updated. In the key press case, you should observe that (for example) NSMenuPropertyItemImage is not set, so if updating the item's image is slow, you could avoid doing that work.
There isn't a good way to get this info prior to 10.6.
-eric
_______________________________________________
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