On 23 nov. 2010, at 20:49, Joachim Baran wrote:

> Hi!
> 
> On 23 November 2010 19:44, Fritz Zaucker <[email protected]> wrote:
>> That would only make sense to me, if I would add the widgets again later on.
>> Is something like that done in the framework somewhere?  Otherwise it would
>> perhaps even be possible to replace removeAll() by destroyAll()
>  My I veto that, please. :) I use removeAll() and re-use the
> components in other places afterwards.
> 
+1

To me, it sound like there is a confusion between destroyAll() and removeAll().

remove() and removeAl() should apply to a container and should remove the 
widget from the container.
Nothing to do with reclaiming memory.
Removing and re-adding a widget is very common way to speed up GUI by reusing 
widget instance.

destroy() sound like a destructor, isn'it ?


>>  or have a removeAll with a destroy parameter.
>  I would second that though.
> 

I don't understand the need to mix 2 different things : reclaiming the memory 
and removing from container.
Why one would need to reclaim the memory with a remove ? In what case ?
Why not calling destroy on the rot container that in turn, internally, will 
loop and call remove + destroy ?

Code and API should show the intention as much as possible, so :
If a qooxdoo user call remove or removeAll it mean only removing widget from 
container. Remove should not make sense outside a container.
If a qooxdoo user call destroy or destroyAll it mean recovering memory, 
destructing a widget instance and this will also need to cascade the destroy it 
that widget is a container.

My 2 cents.


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to