Mark Lundquist wrote:
I've got some CForms widgets of <datatype base="long"/>, so I expect that the widget value should be a java.lang.Long, right? I'm trying to do some arithmetic on these widget values in flowscript, and it seems like every reference to the widget value gets (a) converted to a JS "number" type, and (b) truncated to an integer value. I have all kinds of print() scaffolding crap in my flowscript now to try to get a handle on this... and even, e.g.

    print (typeof someWidget.value);

prints "number" where I'd have expected it to print "object". calling toString() on the value likewise prints a truncated-to-integer value, e.g. '3' if I input '3.5' in the form. Please enlighten me :-)

Aren't you mixing up 'long' with 'double'? I think you need <datatype base="double"/> or <datatype base="decimal"/> for a value like 3.5...

See [1] for more info.

Regards
Niels

[1] http://cocoon.apache.org/2.1/userdocs/widgetconcepts/datatypes.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to