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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to