Re: Interface Builder (almost) supports NSToolbar
Re: Interface Builder (almost) supports NSToolbar
- Subject: Re: Interface Builder (almost) supports NSToolbar
- From: Brian Krisler <email@hidden>
- Date: Tue, 4 Mar 2008 21:04:06 -0500
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.
If I add the item using the delegate, I just get a duplicate item in
the toolbar.
Am I missing something?
Brian
On Mar 3, 2008, at 2:12 PM, Quincey Morris wrote:
On Mar 3, 2008, at 10:53, Brian Krisler wrote:
I have discovered that it is now "almost" possible to create
toolbars from within
Interface builder, with one big exception. There appears to be no
way to
define identifiers for the toolbar items.
Is this a sign of future functionality? I can not find any
documentation
on NSToolbar within IB, every document I can find explains how to
implement
toolbars from code, using delegates.
After more exploring, I discovered that I could open the XIB file
in an XML editor,
and define the identifiers for my items (they were set to GUID's).
After renaming
them to understandable values, I was then able to specify their
selected state
from within the code, using my identifiers.
There are a few inspector values that I am not sure exactly what
they do yet, they
appear to have no direct function.
Has anyone had experience, good or bad, with creating toolbars from
IB?
I had the same kind of WTF?!? reaction to the IB's toolbars, until I
guessed you're apparently supposed to do the blindingly obvious:
create IBOutlets for each toolbar item you care about in your window
controller class, hook them up in IB, and do whatever (such as
assigning identifiers, or making certain items selectable) in the
window controller's nib-awake-time code, or its toolbar-delegate
methods.
It feels a little hokey using outlets for this, but it works fine.
_______________________________________________
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