Thank you. So if I understand it correctly I could use:
defer : function() {
qx.ui.form.DateField.getDefaultDateFormatter = function() {// ...}
},
in my subclass to overwrite static methods of the superclass. Is this a
valid approach for overwriting static members? Could we add it to the
documentation under polymorphism? If so I rather overwrite the
defaultDateFormatter than removing the listener. From my POV it doesn't
not make sense to add the listener in the superclass constructor and
remove it again in the subclass constructor, it seems to create
unnecessary overhead.
Regards,
Martijn
Op 12-04-11 09:04, Martin Wittemann schreef:
> Hey,
>> * Cannot overwrite the "getDefaultDateFormatter" method because the
>> DateField constructor is referencing the baseclass formatter specifically.
> getDefauldDateFormatter is static so you can't override it anyway. The way to
> go here is to set your own format with setDateFormat in your constructor,
> which should be done after you called the base method.
>
>> * Cannot overwrite the constructor because I can not prevent or remove
>> the "changeLocale" listener.
> Thats true and should be changed. Would you mind open a bug report for that?
> We should just makte the listener id protected which solves all your problem.
>
>> * The date formatter property is replaced by the default formatter when
>> the "changeLocale" event is triggered. So event if I change the property
>> it is replaced when the locale is changed.
> As a workaround, you can manually patch the getDefauldDateFormatter:
>
> qx.ui.form.DateField.getDefauldDateFormatter = function() {// ...}
>
> Regards,
> Martin
> ------------------------------------------------------------------------------
> Forrester Wave Report - Recovery time is now measured in hours and minutes
> not days. Key insights are discussed in the 2010 Forrester Wave Report as
> part of an in-depth evaluation of disaster recovery service providers.
> Forrester found the best-in-class provider in terms of services and vision.
> Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel