Re: Problem configuring NSToolbarItem in IB
Re: Problem configuring NSToolbarItem in IB
- Subject: Re: Problem configuring NSToolbarItem in IB
- From: Christian Corsano <email@hidden>
- Date: Sun, 25 May 2008 19:31:32 +0200
On 25 mai 08, at 18:45, Jens Alfke wrote:
You should be able to add IBOutlets to your controller and wire them
up to the individual toolbar items in IB.
Thanks Jens, I hadn't thought of this solution !
But it still doesn't fell right to have to wire all these instances
manually and keep a reference in my controller just to set their
identifiers ...
On 25 mai 08, at 18:53, Nathan Kinsinger wrote:
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.
Thanks Nathan, I was wondering how other people dealt with this problem
I have considered this solution, but as I haven't decided yet whether
I want to allow toolbar customization I dropped it pretty quickly (and
even if I decide not to, using a label as an unique identifier seems
too much of a hack in this beautiful Cocoa world).
Here's what I've done for now : removed the items from my toolbar in
IB and initialized them in my controller.
This way I can avoid hardcoding everything related to the toolbar
items, as I load their values from a localized plist file.
But of course I can no longer visualize my toolbar items in IB ... I
may eventually switch to Jens' idea
Christian
_______________________________________________
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