I had the same problem, I always got a Coercion error, and my solution was to implement the getter and setter for the date var:
private var _date : Date;
public function get date():Date
{
return _date;
}
public function set date(value:*):void
{
_date = new Date(value);
}
I'm also using unix timestamps to send the values, but I've noticed a weird behaivour: Went sending dates to Flex, I have to multiply the timestampy by 1000, and when receiveing from Flex, divide it also by 1000. If not, the date is not the same. Anyone knows why?
Oriol.
2006/8/21, Marcelo de Moraes Serpa <[EMAIL PROTECTED]>:
Hmm.. I haven´t ran the login sample app.
For dates, I always used unix timestamps and converted the timestamp to string on the server before returning it to flash. For my purposes it always worked well as I never had to do any date math on the client side.
Take a look at this page:
http://www.amfphp.org/docs/datatypes.html
and note the DateWrapper class... maybe it could solve your problem?
Marcelo.On 8/21/06, Stefan Schmalhaus < [EMAIL PROTECTED]> wrote:--- In [email protected], "Marcelo de Moraes Serpa"
<[EMAIL PROTECTED]> wrote:
> If you´re using RemoteObjectAMF0, just take a look at the samples Renaun
> provides.
Yes, I'm using Renaun's RemoteObjectAMF0. But in the sample he
provides the date mapping doesn't work either. The "published date"
column is empty!
http://renaun.com/blog/2006/07/26/71/
Take a look at comment #23!
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Software development tool | Software development | Software development services |
| Home design software | Software development company |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___

