Hello Sebastian,

BJörn Lindqvist schrieb:

Just do something like:

var myView = new QxListView(data, cols);

data.removeAll();
data.append(newArrayFromSomeOtherSource);
myView.update();

In my personal qooxdoo extension library I also have a setData()
method. The reason is that the above is four lines, this:

myView.setData(newArrayFromSomeOtherSource);

Yes, but you can implement your method the same way. You don't think
it's a good idea to redefine the array. It's better to replace it's
content. This is what the above content should show.

Sebastian


I came up with different solution based on ur comments this is what my methods look now:

In QxListView.js:
...
proto.setData = function(vNewData) {
   this._data.removeAll();
   this._data.append(vNewData);
   this._pane.setData(vNewData);
   this.update();
};
...

In QxListViewPane.js:
...
proto.setData = function(vNewData) {
   this._data.removeAll();
   this._data.append(vNewData);
   this._updateLayout();
   this._updateRendering(true);
};
...

The thing is: I'm not sure about calling _updateLayout and _updateRendering in QxListViewPane :S

Thanks for ur hard work Sebastian :D

VoidMain






-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to