Nice, thanks, Chris.
On Mon, Mar 21, 2011 at 7:49 AM, Christian Hagendorn <
[email protected]> wrote:
> Hi Guilherme,
>
> just to keep you up to date. We improved the delegate interface, now it
> doesn't differentiate between leafs and nodes.
>
> 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.
>
>
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel