Re: re Hiding controls and another question
Re: re Hiding controls and another question
- Subject: Re: re Hiding controls and another question
- From: John Saccente <email@hidden>
- Date: Fri, 1 Mar 2002 23:14:36 -0600
On Friday, March 1, 2002, at 10:14 PM, Graeme Hiebert wrote:
On Friday, March 1, 2002, at 07:42 AM, Dennis De Mars wrote:
The topic is often described as "hiding NSViews" so you might want to
search on that, or simply on "hiding." I can assure you that the topic
came up at least twice in the past month.
I agree there should be a facility to make controls, or NSViews in
general, invisible. Since many people seem to expect this feature, and
pretty much every other GUI framework I've ever seen has it, I think
Apple should just add it in a future update. (As you can see, some
other people feel differently, but they don't have to use it). Until
that happens, if ever, I have a few comments for you:
<snip>
Here's what 20 minutes can buy you. No guarantees -- I'm not yet all
that experienced in real-world Cocoa -- but it seems to work for me.
<http://homepage.mac.com/graeme/.cv/graeme/Public/ViewHiding.tar.gz-binhex.
hqx>
Now can we move on? :^)
Not quite yet! :o)
I think this:
if ( ![gViewDict objectForKey:self] )
should be
if ( ![gViewDict objectForKey:[self description]] )
Anyway, one possible problem might be that if the superview is
destroyed, the detached subview will be left floating in limbo, no?
Plus, any messages sent to the hidden subview will go to the proxy and
will be lost (like a setStringValue: or something.) Perhaps you'd want
a special NSView subclass for your proxy object which was aware of its
disembodied doppelganger and would forward messages accordingly?
John Saccente
email@hidden
_______________________________________________
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.