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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to