[fxruby-users] deleting children and then adding new ones

Jeroen van der Zijp jeroen at fox-toolkit.org
Mon Dec 10 23:48:17 EST 2007


On Monday 10 December 2007, Ralph Douglass wrote:
> Thanks, the recalc and create worked really well.  I saw the example of the
> FXSwitcher widget on the website, but thought it wasn't really what I wanted
> at the time.  I'll give it a second look now.

FXSwitcher is probably recommended for something like this; however, it is
not forbidden to destroy windows in response to SEL_COMMAND callback from
FXButton.

But please note, many callback messages are generated in the middle of a 
user-transaction, and not at the end of one.  In such cases, the widget
is expected to exist upon return from the callback.

We take great pains to ensure that for the SEL_COMMAND callback, no further
references to the originating widgets are made.  So its true that for *most*
widgets, you are allowed to do anything in the SEL_COMMAND, including deleteing
the originating widget.  

But I do suggest not to make a habit of it.  



		- Jeroen




-- 
+----------------------------------------------------------------------------+
| Copyright (C) 22:40 12/ 3/2007 Jeroen van der Zijp.   All Rights Reserved. |
+----------------------------------------------------------------------------+


More information about the fxruby-users mailing list