Same happens with NaN. Do you (Adobe) have any thoughts as to whether this is worthy of a “fix”, or will we need to remember to add the logic to check for 0 in all of our Java objects.

 

Thanks,

 

Jim

 

-------------------------------------------------

Jim Schneider

KJ Interactive, Inc.

1-877-370-6906

1-612-605-5399


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Sunday, February 26, 2006 8:12 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex2: AS Number to Java Long mapping

 

What happens if you set the Number to NaN in AS?  I believe null will coerce to 0 in AS3.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jim Schneider
Sent: Sunday, February 26, 2006 9:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2: AS Number to Java Long mapping

 

I’m experiencing the following behavior. I set an AS Number variable to null prior to sending to a remote object. On the backend (Java), the Number is converted to a 0. The expected data type on the Java end is a Long (object, not primitive). This is causing us problems since we expect a null Long object to be represented as null in the database, not 0, and as an indicator of a new object that needs to be inserted rather than updated.

 

Is this expected behavior/mapping? Is it a bug? I can fix it on the backend with some additional logic, but I’d rather not have to do that.

 

Thoughts?

 

Thanks.

 

-------------------------------------------------

Jim Schneider

KJ Interactive, Inc.

1-877-370-6906

1-612-605-5399

 





--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to