Test demonstrating the need for the callback is:

I believe the callback was introduced as an optimization (though it's been a
while since the change).

I will investigate further.

On 27 January 2010 22:36, cmal...@pixelzoom.com <cmal...@pixelzoom.com>wrote:

> Looking at PSwing in 1.3-rc1 ...
> The constructor adds a ComponentAdapter that changes the visibility of
> the PSwing node as the Component is shown/hidden.   Does anyone recall
> the motivation for adding this?
> Looking at the PSwing.setVisible override, this ComponentAdapter seems
> unnecessary, perhaps even a bit dangerous.  If someone calls
> setVisible directly on the Component, will this change the visibility
> of the node? (The specifics of exactly when componentShow and
> componentHidden are called has always eluded me.)
> One of my applications is experiencing an endless circularity related
> to this.  The calls look like:
> setVisible true
> componentHidden
> setVisible false
> componentShown
> setVisible true
> // ... etc forever
> I'm still trying to track this down, and it may be a client-code
> issue.  But it wasn't an issue with earlier versions of PSwing, and
> demonstrates (I think) the potential danger of this ComponentAdapter.
> --
> Piccolo2D Developers Group:
> http://groups.google.com/group/piccolo2d-dev?hl=en

Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en

Reply via email to