Re: How to force NSMenu to redraw its menu items?
Re: How to force NSMenu to redraw its menu items?
- Subject: Re: How to force NSMenu to redraw its menu items?
- From: Nava Carmon <email@hidden>
- Date: Wed, 21 Jul 2010 18:41:42 +0300
I'm updating menu items as the user types in the NSSearchField. The number of menu items is up to number of search results. When number of search results stays the same and update menu items with new results (remove previous NSMenuItems and add new upon the search results), the menu is not being updated.
You mean I need to update my menu with new search results in menuNeedsUpdate? I tried this, it didn't work
On Jul 21, 2010, at 6:33 PM, Jerry Krinock wrote:
>
> On 2010 Jul 21, at 05:27, Nava Carmon wrote:
>
>> I'm implementing a custom status bar menu ... How do I force them to redraw?
>
> I'm not sure I quite understand your situation, but usually the answer is to implement the -menuNeedsUpdate:. This method is invoked whenever the menu is about to be displayed, which should be sufficient.
>
> _______________________________________________
>
> 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
_______________________________________________
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