Re: NSView Names
Re: NSView Names
- Subject: Re: NSView Names
- From: Ondra Cada <email@hidden>
- Date: Thu, 28 Feb 2002 04:17:29 +0100
Simson,
>
>>>>> Simson Garfinkel (SG) wrote at Wed, 27 Feb 2002 18:22:59 -0500:
SG> They are useful for naming objects. I just wrote a little SwitchingView
SG> and I wanted the gizmo to automatically pick up the titles for the
SG> NSPopUp button from the NIB names. Since I can't get at the NIB Names,
SG> I'm using the Tool. Tip names instead. It's gross, but it works.
That seems to be a "standard" way to do that ;)
My own private defaults framework just scans all view in the panel; if it
founds an NSTextView with tooltip of "@<aaa>@[<bbb>@]" it ensures that the
text view actually edits a string default of name <aaa>; if there's the <bbb>
part, it becomes the real tooltip.
There are similar hacks for checkboxes, popup menus, etc ;))))))
Well although it could be somewhat cleaner, it does not look to me as so big
a hack. Actually, I don't think I would use the main window names for this
anyway: for starters, they cannot be added to any view (but to the root
objects only); besides, I am used to use them to orient myself in the NIB,
and this usage would clash.
OTOH, it would be *QUITE* *NICE* if one could, in a special inspector, add a
generic dictionary of arbitrary key/value pairs to *any* nibbed object. The
dictionary could be stored separately not to slow normal loading of NIBs; it
would be loaded only on-demand, if the application wanted to read the
information from it (hmmmm, that might prove impossible... well, it's too
late for me to design things correctly ;)
---
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.