Hi Nick,

it's correct, what Derrell sad, we have done some optimizations for performance reasons.

My first suspicion was that one listener is not removed when an object is disposed, but with your information I can reproduce the issue, thanks:
http://tinyurl.com/2wmwuga

It seems to me that the dispose method removes the table from the container, but the layout queue tries to render it. Have a look at the execute listener:
button1.addListener("execute", function(e) {
      // works
      win.remove(this.table);

      this.table.dispose();
      this.tableModel.dispose();

// throws an error: Remove Error: qx.ui.table.Table[undefined] is not a child of this widget!
      //win.remove(this.table);

      this.createTable();
     }, this);

The remove method only works, before the table is disposed. When I try to remove the table after the dispose call, I get an error.

Could you please open a bug report with my tinyurl as example?

Thanks,
Chris


Am 05.05.2010 20:11, schrieb Derrell Lipman:
On Wed, May 5, 2010 at 14:09, Nick Watkins <[email protected] <mailto:[email protected]>> wrote:


    I think I figured it out. I traced back through the call stack
    when it goes
    to render the widgets and found that the table's parent had both
    the old and
    new tables as children. One of the tables was the correct one and
    the other
    was the one I disposed. I changed my reloadTable method to the
    following and
    it worked:
    reloadTable : function() {
           // clear the table model's row cache
           this.__table.getTableModel().clearCache();
           this.remove(this.__table);

           // delete the existing table/model
           this._disposeObjects("__tableModel", "__table");

           // create table and model from scratch
           this.__tableModel = new controlcenter.Model.List.TableModel();
           this.__tableModel.addListener("metaDataLoaded",
    this.__createTable, this);
    },


    I'm not sure of the differences between 1.0.1 and 1.1, but I know
    that I
    wasn't getting errors in 1.0.1. It seems I just need to remove a
    widget from
    a layout prior to calling disposeObjects on it.


Just a couple of weeks ago, there was a bunch of work done on optimizing shutdown of applications. I believe there was work done with disposing, possibly to the disposeObjects() method. It's possible that it used to automatically remove the widget for you, and no longer does so.

Derrell



--
Christian Hagendorn
Software Entwickler

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Gert Nowotny, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to