Hello Jim
> With the new Clazz way of doing things, what is the new and preferred
> way to add functionality to existing qooxdoo classes? Previously, my
> old code might look like this:
>
> qx.Proto = qx.OO.classes["qx.core.Object "].prototype;
> qx.OO.addProperty({ name: "myID", type: "string", defaultValue: ""});
>
> but this doesn't pass the build process for .7 so what is the
> preferred way to do this now? I have read through the new docs but
> didn't see this mentioned.
The supported way to extend existing classes is to use Mixins. You can
define a mixin for your extension and include it to an existing class
using qx.Clazz.include
Example:
qx.Mixin.define("custom.MObject",
{
properties : {
myID : {
type: "string",
defaultValue: "",
_legacy: true
}
}
});
qx.Clazz.include(qx.core.Object, custom.MObject");
If you want to overwrite existing methods/properties you can use
qx.Clazz.patch instead but we hope this is never needed because changing
the imlpementation is always risky and may break code.
Best Fabian
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel