• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSToolbar: notification of change?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSToolbar: notification of change? (From: David Reitter <email@hidden>)
 >Re: NSToolbar: notification of change? (From: Keary Suska <email@hidden>)
 >Re: NSToolbar: notification of change? (From: David Reitter <email@hidden>)

  • Prev by Date: Keeping track of CGAffineTransform's action
  • Next by Date: NSOutlineView sometimes truncates label
  • Previous by thread: Re: NSToolbar: notification of change?
  • Next by thread: Re: NSToolbar: notification of change?
  • Index(es):
    • Date
    • Thread