Hi all,
I've a little problem.
For a project I need columns with special formating in a listview.
My Solution (and the problem ;) )
1. Copy code of qx.ui.listview.ContentCellText into own class, changed
classname (like myapp.listview.OwnContentType)
2. Made an own class that extends qx.ui.listview.Header Class and
override the constructor. My Own code checks the name of the type and
uses my class instead of default ones.
Example loading would be:
if (vColumns[vCol].type.substr(0, 5) == 'myapp')
{
vColumns[vCol].contentClass =
qx.Class.getByName(vColumns[vCol].type);
} else {
vColumns[vCol].contentClass =
qx.Class.getByName("qx.ui.listview.ContentCell" +
qx.lang.String.toFirstUp(vColumns[vCol].type || "text"));
}
3. And at last an own extended version of qx.ui.listview.ListView with
overriden contructur to use my header class and some other extensions.
4. On column define in the application I wrote the full classname
instead of the short "text", "iconhtml" and co.
That all works in source version, but is broken in build version.
I got a lot of errors in the build version, like:
011391 ERROR: qx.ui.listview.ListViewPane[1572]: Error while getting row
property (0|paddingLeft): TypeError - this._rowData[vRowIndex] has no
properties
011438 ERROR: qx.ui.listview.ListViewPane[1572]: Error while getting row
property (0|paddingRight): TypeError - this._rowData[vRowIndex] has no
properties
011484 ERROR: qx.ui.listview.ListViewPane[1572]: Error while getting row
property (0|heightComputed): TypeError - this._rowData[vRowIndex] has no
properties
011516 ERROR: qx.ui.listview.ListViewPane[1572]: Error while getting row
property (0|heightType): TypeError - this._rowData[vRowIndex] has no
properties
011563 ERROR: qx.ui.listview.ListViewPane[1572]: Error while getting row
property (0|heightParsed): TypeError - this._rowData[vRowIndex] has no
properties
011625 ERROR: qx.ui.listview.ListViewPane[1572]: Could not layout child
[object qx.ui.listview.ContentCellText] through layout handler:
TypeError - this._rowData[vRowIndex] has no properties
If I define the type of the column with text, no error is shown.
I know that this is very hard to debug from remote, so I have mainly two
questions:
- Which different could be a problem between build and source version
here? I allready tried to deactivate the optimizings, but with no result
(only nicer debug code, but still not helpfull since it allways points
into qooxdoo classes)
- Is that a good way to solve this "problem", or is there a better way
of extenting the listview class with own column types. My needs are, for
example, to put a unixtimestamp value into the field, but outputs an
formated datetime.
Greetings,
Leander
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel