• 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: NSView Names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView Names


  • Subject: Re: NSView Names
  • From: Graeme Hiebert <email@hidden>
  • Date: Wed, 27 Feb 2002 18:47:06 -0800

On Wednesday, February 27, 2002, at 03:44 PM, Andy Lee wrote:

Here's a lazy man's approach to setting up an NSDictionary without modifying IB. Create a non-displaying window, and put an NSMatrix of text cells into it. The matrix should have two columns and as many rows as you want to have dictionary entries. Type the object names into the left column. Connect the cells of the second column to the objects you want to name, using the "target" outlet. Create and instantiate a class which has an outlet pointing to the matrix. In this class, have an -awakeFromNib method that traverses the matrix and builds up the NSDictionary.

I like this solution (and may even use it -- or rather, the one-column version -- myself sometime), but there is another way. You can always assign a name through the AppleScript properties, and use AppleScript calls to work with the name.

I think the NSMatrix/NSDictionary is probably easier, though.

-g
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSView Names (From: Andy Lee <email@hidden>)

  • Prev by Date: Finding point on Bezier curve?
  • Next by Date: Re: NSView Names
  • Previous by thread: Re: NSView Names
  • Next by thread: Re: NSView Names
  • Index(es):
    • Date
    • Thread