Howdy,

absolutely right, the API at various places could be easier and more 
intuitive for the application developer. Please see the corrensponding 
entry in Bugzilla:

http://bugzilla.qooxdoo.org/show_bug.cgi?id=116

Some of the your widget examples could need a specific mapping to hide 
internal composition. Once that sort of stuff is fixed (over time), 
migration scripts would translate existing "ugly" code.

Cheers,

Andreas



frederic wrote:
> Hello all,
> I try to use the widget qx.ui.ListView :
> 
> *** ListView creation and fill with data
> 
> var ld=[];
> for (i=0;i<10;i++){
> ld.push({
> COL1 : { text : "TEST1" },
> COL2 : { text : "TEST2"},
> COL3 : { text : "TEST3" },
> });
> }
> var lc = {
> COL1 :        { label : "myCol1", width : 120, sortable: true, type : "text" 
> },
> COL2 : { label : "myCol2", width : 50, sortable: true, type : "text", align
> : "center" },
> COL3 :        { label : "myCol3", width : 80, type : "text" },
> }
> var lv = new qx.ui.listview.ListView(ld, lc);
> 
> *** Add event when people selected a row in the list view :
> 
> lv.getPane().getManager().addEventListener("changeSelection", function(e)
> {....});
> 
> Why this complex syntax ? what do you think have in the furture, syntax like
> this :
> lv.addEventListener("changeSelection", function(e) {...}); ?
> 
> *** My Code to get data from the selected row :
> 
> var i=lv.getPane().getRelativeItemPosition(lv.getPane().getSelectedItem());
> this.info(lv.getData()[i]["COL1"]["text"]);
> this.info(lv.getData()[i]["COL2"]["text"]);
> 
> This code is working but is ugly, do you know an elegant way to get data
> from a selected row ?





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to