[EMAIL PROTECTED] schrieb: > Christian Boulanger <[EMAIL PROTECTED]> writes: > >>> You can define a mixin with the desired property and include the mixin >>> at runtime into any class you want. >>> >> but I forgot to ask: how is this done exactly? I haven't found any >> example or documentation for this on the qooxdoo website. >> <snip/> > And then to add this mixin to your class, you either (a) use qx.Class.include > or (b) add an "include" property to your class configuration. > > Option (a): > > qx.Class.include(my.TestClass, my.MDebug); > This was what I was looking for. Option b) is used in many qooxdoo classes and therefore well-tested. I'll add this to the wiki as soon as I get to it.
Many thanks, Derrell! Christian > Option (b): > > qx.Class.define("my.TestClass", > { > include : [ my.MDebug ], > > properties : { ... }, > > members : { ... } > }); > > Option (a) is useful if you want the application to be able to choose whether > it wants the features available in a particular mixin, but don't need for them > to always be included in every application. > > Option (b) is useful for dividing a large class up into multiple files where > you still always wanted all of the features in both the original class > definition and the mixins to be available. > > I've never tried (b) but it's supposed to work. Option (a) works well. I use > it for the TreeVirtual mixins. > > For additional documentation, look at qx.Mixin. > > Christian, once you confirm that all of the above works as described and has > no typos, please feel free to add this description to the wiki. Wikis and I > don't get along well, so I tend not to add stuff there but rather answer > questions here. > > Derrell > > > ------------------------------------------------------------------------- > 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 > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------- 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 qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel