Hello Fritz,

I just gave your code a try in the trunk and in a checkout from your  
given date. In both cases, I don't get a deprecation warning using  
setValue on the date field. The setDate method is deprecated so its ok  
to get a warning there.
That both ways are working like expected is good to hear and a desired  
behavior. The deprecation just tells you, that this method will be  
deleted in the next release. So they should work as long as they are  
available.
The look to the API does also not show me any problems. The methods  
using the date as postfix are deprecated (strikethrough) and the value  
methods are not deprecated.

Could you try to update to trunk and check again or tell me the  
revision so that I could check and fix the misbehavior?

Regards,
Martin


Am 30.07.2009 um 23:38 schrieb Fritz Zaucker:

> Hello,
>
> I am using a DateField widget with a svn checkout from July 29th 2009:
>
>         var dateField = new qx.ui.form.DateField();
>         var format = new qx.util.format.DateFormat("dd.MM.yyyy");
>         dateField.setDateFormat(format);
>
> So far, so good. Then when trying to set the textfield:
>
> 1) When using
>
>         dateField.setValue(new Date());  // as in the demobrowser
>
>     I get a console warning of
>
>       The method 'qx.ui.form.DateField:setDate' of class
>       'qx.ui.form.DateField' is deprecated: Please use the setValue
>       instead.
>
> 2) When using
>
>         dateField.setValue(new Date());  // as suggested by the  
> warning
>
>    I get a console warning of
>
>       The method 'undefined:constructor' of class 'qx.ui.form.DateField'
>         is deprecated: Value property is used for setting dates now.
>
> In both cases the textfield is set properly.
>
> 3) Neither setDate('30.07.2009') nor setValue('30.07.2009') set the
>    textfield of the DateField widget. Both give the corresponding  
> warning
>    messages of 1) and 2).
>
> So, what is the right way to set the DateField widget and also to  
> retrieve
> the date?
>
> Thanks,
> Fritz
>
> P.S.: I have the impression that the documentation in the API viewer  
> is not
>       very everywhere in sync with the deprecation messages. Another
>       examples is changeSelected versus changeSelection event  
> handling.
>
> -- 
> Oetiker+Partner AG            tel: +41 62 775 99 03 (direct)
> Fritz Zaucker                        +41 62 775 99 00 (switch board)
> Aarweg 15                            +41 79 675 06 30 (mobile)
> CH-4600 Olten                   fax: +41 62 775 99 05
> Schweiz                         web: www.oetiker.ch
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to