Here I show you the problem!

Example 1
--------------

test : function()
{
// table model
var tableModel = new qx.ui.table.model.Simple();

//// NECESSARY TO GET IT WORKING!!!
tableModel.setColumns([ "", "", "", "" ]);

tableModel.setData(createRandomRows(1000));

// make second column editable
tableModel.setColumnEditable(1, true);

// table
var table = new qx.ui.table.Table(tableModel).set({
  decorator: null
})
win.add(table);

var tcm = table.getTableColumnModel();

// Display a checkbox in column 3
tcm.setDataCellRenderer(3, new qx.ui.table.cellrenderer.Boolean());

// use a different header renderer
tcm.setHeaderCellRenderer(2, new 
qx.ui.table.headerrenderer.Icon("icon/16/apps/office-calendar.png", "A date"));

 this.updateLocale();
},

updateLocale : function()
{
  this.__tableModel.setColumns([ this.tr("xx"), "foo", "bar", "baz" ]);
}
--------------------------------
this line:

tableModel.setColumns([ "", "", "", "" ]);

must be there and it makes it one line too many, because the local info should 
be in the updateLocale function. THere is no function as I can see called 
tableModel.setNumberOfColumns(3);

Also the references if you don't have this line

tableModel.setColumns([ "", "", "", "" ]);


will not work! This dummy line is needed to do anything within the column model.

The point here is to separate the locale information so it can be updated at 
any time, by for example a listener, which you didn't understand from my poor 
description.

Stefan
                                          
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to