Hi there,

I currently have a situation that I am not sure of whether this is logical or a
bug...

I have a (data-)model, a tree and a controller.
BTW: The model and it's initial creation is "stolen" from the model used by the
TreeController demo of the demobrowser[1].
This is the playground URL of an example:
  http://tinyurl.com/y85jsn3

Creating and displaying the model works fine. But as soon as I remove nodes
from sub-nodes, this demo fails.

In my example this happens when the loop in "onButtonExecute" calls the
"removeAll" method of the 2nd array element (Or after "removeAll"-call of the
1st element?!).
Try to comment out that line[2] and you will see an alert box containing 50 dots
(as expected). With the line active, nothing happens (an exception is thrown,
which is not caught in this example).

The exception seem to be thrown in "qx.data.controller.Tree" in method
"__changeModelChildren" (line 342).

Is this a behavior I should have expected? Or am I using the model completely
the wrong way?

The rationale for this demo/test was, that the creation of the model nodes in
my "real" application is quite expensive and I like to re-use them when
re-building the new tree/model.

Regards,
  Peter

P.S: The qooxdoo version used is 1.1-pre ...at least thats what the demobrowser
     says ;)
----
[1] http://demo.qooxdoo.org/devel/demobrowser/#data~TreeController.html
[2] Line numbering is a missing feature of the playground ;) But it seems to be
    line number 42...
    <code>
    nodes[i].getChildren().removeAll(); // THIS THROWS AN EXCEPTION ON...
    </code>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to