But a Java primitive does not. That's where it gets confusing. AS has only one Number type, not two like Java. Since a primitive CANNOT be null, you have to stick with the least common denominator ya know?
CORBA had this too, hence the structure solution. Unless AS has both a primitive and an Object numeric type I dont know how else to do the data type mapping but to stick with a 0? -- Dave Wolf Cynergy Systems, Inc. Macromedia Flex Alliance Partner http://www.cynergysystems.com Email: [EMAIL PROTECTED] Office: 866-CYNERGY --- In [email protected], "Jim Schneider" <[EMAIL PROTECTED]> wrote: > > Yep, that's the issue. Actionscript has the concept of null. Java has the > concept of null. It would seem that AMF/Flex should be able to map the two > "correctly". > > ------------------------------------------------- > Jim Schneider > KJ Interactive, Inc. > 1-877-370-6906 > 1-612-605-5399-----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Dave Wolf > Sent: Thursday, March 02, 2006 1:46 PM > To: [email protected] > Subject: [flexcoders] Re: Flex2: AS Number to Java Long mapping > > > The core of the issue is that the deserializer cant seperate a > primitive from an Object wrapper right? I mean mapping a null onto a > long of 0 is correct. The issue youre having is you want a Long which > itsel is null right? > > I can say you'd face this issue in CORBA all the time too. The > solution in CORBA was to pass a structure that had an isNull property. > > struct NullableLong > { > long value; > bool isNull; > } > > Now you would set the value to zero but the isNull to true. > > Just how we solved this back in the CORBA days :) > > Passing nulls across languages (hence the CORBA tie) is always an ugly > issue in distributed computing. > > > -- > Dave Wolf > Cynergy Systems, Inc. > Macromedia Flex Alliance Partner > http://www.cynergysystems.com > > Email: [EMAIL PROTECTED] > Office: 866-CYNERGY > > > > > --- In [email protected], "Jim Schneider" <jschneider@> wrote: > > > > 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: [email protected] [mailto:[EMAIL PROTECTED] On > > Behalf Of Matt Chotin > > Sent: Sunday, February 26, 2006 8:12 PM > > To: [email protected] > > 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: [email protected] [mailto:[EMAIL PROTECTED] On > > Behalf Of Jim Schneider > > Sent: Sunday, February 26, 2006 9:20 AM > > To: [email protected] > > 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 > > > <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site > > > +design+development&w2=Computer+software+development&w3=Software+design+and+ > > > development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1 > > 66&.sig=L-4QTvxB_quFDtMyhrQaHQ> site design development > > > > Computer > > > <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+si > > > te+design+development&w2=Computer+software+development&w3=Software+design+an > > > d+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s > > =166&.sig=lvQjSRfQDfWudJSe1lLjHw> software development > > > > Software > > > <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+ > > > site+design+development&w2=Computer+software+development&w3=Software+design+ > > > and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5 > > &s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> design and development > > > > > > Macromedia > > > <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+deve > > > lopment&w2=Computer+software+development&w3=Software+design+and+development& > > > w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6n > > PIrz7_EpZI36cYzBjw> flex > > > > Software > > > <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=W > > > eb+site+design+development&w2=Computer+software+development&w3=Software+desi > > > gn+and+development&w4=Macromedia+flex&w5=Software+development+best+practice& > > c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> development best practice > > > > > > > > > > > > _____ > > > > YAHOO! GROUPS LINKS > > > > > > > > * Visit your group "flexcoders > > <http://groups.yahoo.com/group/flexcoders> " on the web. > > > > * To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > * Your use of Yahoo! Groups is subject to the Yahoo! > > <http://docs.yahoo.com/info/terms/> Terms of Service. > > > > > > > > _____ > > > > > > > > > > -- > 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 > -- 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/

