Hi Guilherme,

Thanks for your feedback. I also noticed this issue and I also think we should rethink the design.

Cheers,
Chris

Am 03.03.2011 20:25, schrieb Guilherme Aiolfi:
Hi,

wouldn't it be better to use just one bind function in the delegate to both: folders and leaves? and have a way to test if a node is leaf or not?

i.e as it is currently:

// delegate implementation
bindNode : function(controller, item, id) {
controller.bindDefaultProperties(item, id);
controller.bindProperty("size", "size", null, item, id);
controller.bindProperty("checked", "checked", null, item, id);
controller.bindPropertyReverse("checked", "checked", null, item, id);
controller.bindProperty("date", "date", null, item, id);
controller.bindProperty("mode", "mode", null, item, id);
controller.bindProperty("light", "leadIcon", {
converter : function(data) {
return data ? "icon/16/status/dialog-information.png" : "";
}
}, item, id);
},


// delegate implementation
bindLeaf : function(controller, item, id) {
controller.bindDefaultProperties(item, id);
controller.bindProperty("size", "size", null, item, id);
controller.bindProperty("checked", "checked", null, item, id);
controller.bindPropertyReverse("checked", "checked", null, item, id);
controller.bindProperty("date", "date", null, item, id);
controller.bindProperty("mode", "mode", null, item, id);
controller.bindProperty("light", "leadIcon", {
converter : function(data) {
return data ? "icon/16/status/dialog-information.png" : "";
}
}, item, id);
},


suggested:
// delegate implementation
bindNode : function(controller, item, id) {
if (item.isLeaf())
{
//do something
}
else
{
// do something else
}
}


I know it's not finished or anything. But those changes are better done early than latter.

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to