Hi all,
I want to remove both children of a split pane by using the pane's
remove-method like this:


if (this.getChildren().length == 2) {
  this.remove(this.getChildren()[0]);
  this.remove(this.getChildren()[0]);
}


This code is inside a class that inherits from qx.ui.splitpane.Pane so the
"this" keyword refers to the split pane. 
However, I get the following error:
Remove Error: dummy.ui.view.View[147] is not a child of this widget!

The exception is thrown on the second remove. The first
this.getChildren()[0] statement returns the dummy.ui.view.View[111] object
which can be removed successfully. The second one correctly returns a
dummy.ui.view.View[147] object which is, according to the strange error
message, not a child, although its returned by the getChildren() method. How
is this possible?

Thx
Marius

PS
I created a very simple application to test it. It works fine there:


qx.Class.define("test.Application",
{
  extend : qx.application.Standalone,

  members : {
    main : function() {
      // Call super class
      this.base(arguments);

      var button1 = new qx.ui.form.Button("First Button",
"tttest/test.png");
          var button2 = new qx.ui.form.Button("First Button", 
"tttest/test.png");
          var sp = new qx.ui.splitpane.Pane("horizontal");
          sp.add(button1, 1);
          sp.add(button2, 1);
      
          sp.remove(sp.getChildren()[0]);
          sp.remove(sp.getChildren()[0]);
          
      this.getRoot().add(sp, {edge: 0});
    }
  }
});

-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Remove-children-of-a-qx-ui-splitpane-Pane-tp5121970p5121970.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to