Hello Martin
I just updated to rev 19730 and got yet another warning message. However, I
looked at the source (as Tobi, our local Qooxdoo-Yedi suggested) and found
the problem:
qx.ui.from.DateField.setValue() expects a Date object as argument and not
String (as the API says).
I suggest that the warning message in qx.ui.from.DateField could be
improved:
setValue : function(value)
{
if (qx.lang.Type.isString(value))
{
qx.log.Logger.deprecatedMethodWarning(
arguments.callee, "Value property is used for setting
dates now."
);
return;
}
Perhaps something along the line "wrong data type for setValue" ?
Lesson learnt: if using the svn-version of Qooxdoo, also use a local
(matching) API-viewer and Demobrowser and NOT the online
official (stable) version.
Thanks for help anyway.
Cheers,
Fritz
On Fri, 31 Jul 2009, Martin Wittemann wrote:
> 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
>
>
--
Oetiker+Partner AG tel: +41 62 775 9903 (direct)
Fritz Zaucker +41 62 775 9900 (switch board)
Aarweg 15 +41 79 675 0630 (mobile)
CH-4600 Olten fax: +41 62 775 9905
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