• 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: What is the best way to store some kind of identifying string in an interface builder object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to store some kind of identifying string in an interface builder object?


  • Subject: Re: What is the best way to store some kind of identifying string in an interface builder object?
  • From: Ricky Sharp <email@hidden>
  • Date: Thu, 18 Jun 2009 19:03:41 -0500


On Jun 18, 2009, at 5:15 PM, Chilton Webb wrote:

Hi Greg!

Thanks for writing back.

On Jun 18, 2009, at 4:52 PM, Greg Guerin wrote:
Is there a way to add a tag an IB object in such a way that it is not visible to the user, but in such a way that I could reference it from my app?
Maybe the -tag method: it returns a 32-bit integer.. It's settable in IB as the control's tag value. I don't know if iPhone has it.

Since it's only 32-bits I don't know how useful it would be for your intended purpose. But IB has no inherent use for it, and it is readable from the app.

It *would* be useful, but IB doesn't let you set it to a string in Cocoa. It's limited to numeric values, which makes it less useful for humans.


For a bit of perspective, this is doable in *CARBON* apps, via the 'Command' attribute in Interface Builder. You can only use 4 characters, but it's damned useful. It's commonly used to create interfaces that don't require hard linkage between the code and the view. Somewhat ironically, despite that MVC is the law of the land in Cocoa, this option is not available to Cocoa apps.

I was sure I was mistaken about this! Any other suggestions?


As was suggested, probably a utility app.

I know when I moved one of my apps from Carbon to Cocoa, I also created IB palettes (later plugins) for all the UI. I put conversion APIs around the 'tag' attributes. I could then enter/display four- char codes.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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: 
 >Re: What is the best way to store some kind of identifying string in an interface builder object? (From: Greg Guerin <email@hidden>)
 >Re: What is the best way to store some kind of identifying string in an interface builder object? (From: Chilton Webb <email@hidden>)

  • Prev by Date: continuous spell checking, NSTextView / field editor, document tag
  • Next by Date: [RFC] NSScaleRect for AppKit Drawing Primitives
  • Previous by thread: Re: What is the best way to store some kind of identifying string in an interface builder object?
  • Next by thread: Re: What is the best way to store some kind of identifying string in an interface builder object?
  • Index(es):
    • Date
    • Thread