Sebastian Werner schrieb:
Dietrich Streifert schrieb:
Moin Sebastian,

Let's go back to the apply method:

What would be the cost of allowing the modification of the apply attribute of properties?

This was my problem which lead to this thread.

Within a derived widget I wanted to override the apply method of the superclass. It turned out that there was no apply method defined.

One solution would be to allow to refine "not yet defined" attributes of a property. This would be the event and apply attribute.

Would this be possible?

This is not possible for the same reason.
OK let's see especially for the apply property attribute your arguments against the possibility to allow refinement:

Ok, there are multiple reasons. One major argument is that type changes would allow to switch types completely e.g. from check=String to check=Number for example. Most people would tend to say that this is a bad software design.
OK for the check I agree completely now. But this has nothing to do with the refinement of the apply property.

Another, more technical reason, is that all other changes than init values require a separate setter/getter(...) pair which means that we need to migrate the property defitition of the parent with the overridden settings in the derived class. For example when you change the "check", but want to keep the "nullable" and "init" values. You also need a far more complex check if the this class needs an own setter/getter pair. And there is also an overhead because you need to generate more functions.
Does having a refined apply attribute realy needs the re-creation of the setter/getter method pair?

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



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