Greg,

I'm not sure, but I think that in AS 3.0 you can't assign an empty string to
a Date Object. It's stronglly typed. As well you can't assigns na empty
string to a Numeric variable. You must return 0 or -1 to a numeric variable.
I guess that's the problem.

As you're using Flex2 and ColdFusion, have you tested using session
variables? It's not working for me and I don't know why. I tested the same
components using just the browser and it worked.

Thanks.

Rafael

-----Mensagem original-----
De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome
de Greg Johnson
Enviada em: quinta-feira, 3 de novembro de 2005 15:06
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] Flex 2:CFC can't seem to return the same type

I have a date field that gets returned to Flex2 from a CFC.  Thing is when
there is a date in it, it returns a date.  When there is no date in it, it
returns a empty string.

Flex is having indigestion as the Flex variable is of date type.  So when a
date is returned, its happy, when a empty string is returned, it complains
about coersion failure from string to date.

If this were a different language I would use something like IsDate, but the
closest thing to it seems to be the DateValidator which, atleast as
presented in the documentation, seems more complex then what I really need. 

Is there a function in Flex 2 that will accept a date or a empty string and
will return ether a valid date or an empty date?  Or is there a better way
to pass the date from the CFC so even when its "" flex still sees it as a
date type?

Thanks





------------------------ Yahoo! Groups Sponsor --------------------~--> Fair
play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links



 





--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.6/151 - Release Date: 28/10/2005




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to