• 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: Interface Builder (almost) supports NSToolbar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interface Builder (almost) supports NSToolbar


  • Subject: Re: Interface Builder (almost) supports NSToolbar
  • From: Karl Moskowski <email@hidden>
  • Date: Mon, 24 Mar 2008 10:22:52 -0400

If you're creating a toolbar for which all items should be selectable, instead of binding each of the toolbar's items separately or iterating over them all and building an array, you can just use KVC to get an array of all items' identifiers.

// NSToolbar delegate method
- (NSArray *) toolbarSelectableItemIdentifiers:(NSToolbar*) toolbar {
	return [[myToolbar items] valueForKey:@"itemIdentifier"];
}

(For my prefs window toolbar, this is the only delegate method I've implemented.)

----
Karl Moskowski <email@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Prev by Date: Re: Quickly remove contents from NSArrayController
  • Next by Date: Re: Quickly remove contents from NSArrayController
  • Previous by thread: Re: Interface Builder (almost) supports NSToolbar
  • Next by thread: Changing the format of NSTableColumn built using Core Data Entity ?
  • Index(es):
    • Date
    • Thread