views:

58

answers:

1

Hi,

Is there a way in fluorine to force a nullable double to be passed to flex as NaN? (and vice versa) By default these values are passed as null, but a Number in actionscript is not nullable, so it is converted to 0 by default.

I need server side nullable doubles to be NaN in flex, and NaN values from flex to be nullable doubles on the server side.

Any thoughts?

Thx,

+1  A: 

I don't know Fluorine, but I'd imagine that you could pass in:

  (myDouble ?? Double.NaN)

This expression is of type double, not double?, and it will be NaN if myDouble was null.

Steven Sudit
Tried, but didn't work. The problem lies within the serialization to an AMF packet, that is sent to flex, but I haven't found a way around that.
Bert Vandamme
What I know about `Fluorine` and `Flex` ends at how they're spelled, so I can't give you much direct help here. Indirectly, perhaps you need to perform the above calculation and use it to fill a regular `double`, so that the serializer starts off with the right answer.
Steven Sudit