Re: NSToolbar: notification of change?
Re: NSToolbar: notification of change?
- Subject: Re: NSToolbar: notification of change?
- From: Graham Cox <email@hidden>
- Date: Tue, 2 Jun 2009 13:20:39 +1000
On 02/06/2009, at 1:06 PM, David Reitter wrote:
updating the toolbar regularly from the internal (Lisp-level)
representation
OK, but wouldn't -validateUserInterfaceItem: be appropriate for this?
Since you're only interested in the items actually in the bar, then
you can validate them whenever this is invoked, which will be once per
event loop, essentially. If the internal state of your app needs to
adjust the item, it should do so here. Note that this isn't restricted
to enabling/disabling the item. As each individual toolbar item is
passed to this, you have the item and can modify it as you want,
without caring where in the bar it is.
While this isn't invoked while the user has the toolbar customising
sheet open and is actually adding/removing items, it will be just as
soon as they close it, so updating the items they added immediately.
--Graham
_______________________________________________
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