Re: Is there any overhead on hidden views?
Re: Is there any overhead on hidden views?
- Subject: Re: Is there any overhead on hidden views?
- From: Andrei Tchijov <email@hidden>
- Date: Mon, 1 May 2006 22:12:17 -0400
One other source of overhead is bindings. Even if view is hidden,
bindings will still do they work.
On May 1, 2006, at 9:46 PM, Greg Herlihy wrote:
True, the only the way to hide a view prior to Panther was to
remove it from its view hiearchy. A program doing so would
typically place this code within a "hide" method and add it to an
NSView via a category.
So the actual difference pre and post Panther is not only a
difference in hiding behavior but also in its implementation: that
is, whether to use a program-supplied method to hide a view versus
one supplied by the Cocoa framework. In other words, any program
currently hiding its own views can avail itself of built-in support
for view hiding on Panther and later systems.
Greg
----- Original Message ----- From: "Ondra Cada" <email@hidden>
To: "Greg Herlihy" <email@hidden>
Cc: "John C. Randolph" <email@hidden>; "Eric Lin"
<email@hidden>; "Cocoa-dev" <email@hidden>
Sent: Monday, May 01, 2006 5:34 PM
Subject: Re: Is there any overhead on hidden views?
Greg,
On 2.5.2006, at 2:26, Greg Herlihy wrote:
Actually, hidden views do incur some operational overhead, but
only on Panther and later systems (that is, OS X 10.3 and later).
Well... not quite.
Prior to Panther, hiding a view removed it from its view hierarchy.
Correct me please if I am wrong, but priori to Panther it just *was
not possible* to hide a view. Therefore, if you needed that, you had
to employ some work-around. Which may (or may not) have been removing
it from the hiearchy. You can still do that, *exactly* as you used to
pre-Panther, if you want to.
Starting with Panther, this behavior changed.
Unless I am much mistaken, nothing changed at all; hiding was *added*
instead.
But in exchange for hidden views' overhead comes some welcome
convenience: unhiding a view on a Panther or later OS is much
less of a hassle than it used to be because the hidden view will
be correctly proportioned for its window. In contrast, when
unhiding a view on a pre-Panther OS, the view would have kept the
same dimensions that it had at the time when it was hidden - a
fact which becomes something of a problem if its window has since
been resized.
Actually, if this was an issue, a different work-around used to be
employed -- namely, moving the view outside of its superview frame
(something like [10000,10000]). Now *this* is one work-around which
is not needed anymore (it was ugly, error-prone, and brought number
of generally unwanted consequences).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden