Re: Interface Builder (almost) supports NSToolbar
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