Re: Problem configuring NSToolbarItem in IB
Re: Problem configuring NSToolbarItem in IB
- Subject: Re: Problem configuring NSToolbarItem in IB
- From: Nathan Kinsinger <email@hidden>
- Date: Sun, 25 May 2008 10:53:03 -0600
On May 25, 2008, at 3:56 AM, Christian Corsano wrote:
Hi to you all,
I've been reading this list for quite a while now, and I need a hand
on a small problem :
I can't find a way to set the identifier of my custom NSToolbarItems
in Interface Builder.
I'm building a document based application with a NSToolbar in the
document window.
I've added several custom toolbar items in it, following the
procedure described here:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/IB_UserGuide/BuildingaNibFile/chapter_4_section_4.html#/
apple_ref/doc/uid/TP40005344-CH11-DontLinkElementID_29
Now my problem is I need to use these items programmatically (to
implement a delegate for my NSToolbar), and by looking at the xib
file the identifiers for these items are some kind of hash-code, and
I can't find a place to set it in IB.
I've considered configuring the toolbar in my code (the old way),
but I'd like to avoid it to get a better overview of my design in IB.
I could also subclass NSToolbarItems and override the identifier,
but as I have no need for customizing my toolbar items behavior it
seems a bit of a overkill.
Any ideas ?
Christian Corsano
http://www.conceptoire.com
_________________________________
I have no idea why they don't allow you to set the identifier in IB,
but you can set the Tag of each item and use that to identify each
individual toolbar item.
In a preference panel where the toolbar is not customizable I've used
the paletteLabel as an identifier. But don't do that if it is
customizable since the labels will change if they are localized.
--Nathan
_______________________________________________
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