Re: NSView Names
Re: NSView Names
- Subject: Re: NSView Names
- From: Ondra Cada <email@hidden>
- Date: Thu, 28 Feb 2002 04:22:23 +0100
Andy,
>
>>>>> Andy Lee (AL) wrote at Wed, 27 Feb 2002 18:44:10 -0500:
AL> Here's a lazy man's approach to setting up an NSDictionary without
AL> modifying IB. Create a non-displaying window, and put an NSMatrix of text
AL> cells into it. The matrix should have two columns and as many rows as you
AL> want to have dictionary entries. Type the object names into the left
AL> column. Connect the cells of the second column to the objects you want to
AL> name, using the "target" outlet. Create and instantiate a class which has
AL> an outlet pointing to the matrix. In this class, have an -awakeFromNib
AL> method that traverses the matrix and builds up the NSDictionary.
Nice trick; I'll consider that next time I'll need something similar --
thanks. Incodentally, why use two columns? One should be sufficient, should
it not?
AL> Simson, I don't know if you'll find this any less "gross and awkward"
AL> than the Tooltip trick. If nothing else, this would free up tooltips to
AL> be used for their original purpose in case you ever want that.
That's no problem; all my Tooltip-based tricks allowed to enter the text
wich is meant to be the "real tooltip" as well. Like "@foo@bar@", where "foo"
is the special name of mine, whilst "bar" is the tip to be shown.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.