Revision: 3431 http://vexi.svn.sourceforge.net/vexi/?rev=3431&view=rev Author: clrg Date: 2009-03-17 08:52:09 +0000 (Tue, 17 Mar 2009)
Log Message: ----------- Workaround decimal issues Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/numfield.t Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/numfield.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/numfield.t 2009-03-17 06:00:36 UTC (rev 3430) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/numfield.t 2009-03-17 08:52:09 UTC (rev 3431) @@ -103,6 +103,15 @@ /** parse and return value as a string */ static.valueRead = function() { + // TODO: remove this temporary workaround + var t = trapee.v_edit.text; + try { + t = (t.indexOf('.')) ? vexi.string.parseFloat(t) : vexi.string.parseInt(t); + if (t == vexi.math.NaN) return null; + } catch (e) { + return null; + } + // FIXME: decimal is returning haywire numbers after edits var r = trapee.decimal.canonical; var v = new decimal(r); var dpsActual = v.after; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn