Hi,

if I have a mixin which has an 'inheritable' property like so:

    /** switch to turn databinding on or off */
    dataBinding :
    {
      check : "Boolean",
      init: false,
      inheritable : true
    },

this will break a class which is not a subclass of qx.ui.core.Parent, 
because this class has no "getChildren" method.

This patch corrects this by checking whether the class has the 
getChildren method in Property.js. Please apply.

Thanks,

Christian


Index: 
/home/cboulanger/workspace/qooxdoo-trunk/frontend/framework/source/class/qx/core/Property.js
===================================================================
--- 
/home/cboulanger/workspace/qooxdoo-trunk/frontend/framework/source/class/qx/core/Property.js
   
 (revision 7847)
+++ 
/home/cboulanger/workspace/qooxdoo-trunk/frontend/framework/source/class/qx/core/Property.js
   
 (working copy)
@@ -1167,9 +1167,9 @@
         // Require the parent/children interface
         if (config.inheritable)
         {
-          code.push('var a=this.getChildren();if(a)for(var 
i=0,l=a.length;i<l;i++){');
+          code.push('if(this.getChildren){var 
a=this.getChildren();if(a)for(var i=0,l=a.length;i<l;i++){');
           code.push('if(a[i].', this.$$method.refresh[name], ')a[i].', 
this.$$method.refresh[name], '(inherited);');
-          code.push('}');
+          code.push('}}');
         }
       }
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to