• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem configuring NSToolbarItem in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Problem configuring NSToolbarItem in IB (From: Christian Corsano <email@hidden>)

  • Prev by Date: Re: Faster way to test pixels?
  • Next by Date: Re: How to Delay, Wait, Pause...
  • Previous by thread: Re: Problem configuring NSToolbarItem in IB
  • Next by thread: Core Data add object
  • Index(es):
    • Date
    • Thread