• 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: Quincey Morris <email@hidden>
  • Date: Tue, 4 Mar 2008 18:23:24 -0800


On Mar 4, 2008, at 18:04, Brian Krisler wrote:

I am not sure I fully understand your solution.  I can bind all my IB
created NSToolbarItems, however there is no way to change the
identifier on already created items from within the awakeFromNIB,
or from init.

Sorry, I didn't realize that you can't set the identifier on a NSToolbarItem (unlike things like NSTableColumns). You're going to have to get the IB-assigned identifer as [yourOutletVariable itemIdentifier] in order to pass it to a NSToolbar method. Here for example is a delegate method I actually used:


- (NSArray*) toolbarSelectableItemIdentifiers: (NSToolbar*) toolbar {
	return [NSArray arrayWithObjects:
			[selectToolbarItem itemIdentifier],
			[drawToolbarItem itemIdentifier],
			nil];
}

If I add the item using the delegate, I just get a duplicate item in the toolbar.

The documentation does say that the available toolbar icons are the ones made available in IB *plus* what your delegate returns, so you don't want to add them again in the delegate. (This was probably in the Leopard developer release notes. I don't remember now.)



_______________________________________________

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: 
 >Interface Builder (almost) supports NSToolbar (From: Brian Krisler <email@hidden>)
 >Re: Interface Builder (almost) supports NSToolbar (From: Quincey Morris <email@hidden>)
 >Re: Interface Builder (almost) supports NSToolbar (From: Brian Krisler <email@hidden>)

  • Prev by Date: Re: lock Keyboard for Kisok-Mode
  • Next by Date: Re: Interface Builder (almost) supports NSToolbar
  • Previous by thread: Re: Interface Builder (almost) supports NSToolbar
  • Next by thread: Re: Interface Builder (almost) supports NSToolbar
  • Index(es):
    • Date
    • Thread