Fabian Jakobs schrieb:
Dietrich Streifert schrieb:
Thank you Jim.

That sounds promising. I also used to extend qx.ui.core.Widget with my own set of properties by using the qx.Proto = ..classname.. syntax.

One more question left ;-)

Is it possible to "overwrite" or redeclare a method of a class by using mixins? If yes: do I have access to the original method of the class?
Something like:

theMethod: function(arg) {
    doSomethingWithArg(arg);
hookToOldMethod.theMethod(arg); }


The typical usage would be to add some code to the method and then call the original method.
Now it's getting dirty ;-) You can overwrite existing methods but there is no way to access the original implementation once it is overwritten. We have no supported way to do this using mixins. You can however always hack the prototype of an existing class and achieve this.


Why is this dirty? There is no real protection in javascript (as it exists in eg. java) against replacing attributes, methods or classes. If the language allows this, the developers will do it.

So having an interface for doing this "dirty things" in a consistent and documented way, will lead to code which is more readable by others and is parseable by the qooxdoo generator which will allow migration pathes.

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

--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner



-------------------------------------------------------------------------
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

Reply via email to