You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/05/02 05:12:22 UTC

[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-27855 Changed value to display ", " when decimal separator is ", "

FLEX-27855 Changed value to display "," when decimal separator is ","


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/8ec4e148
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/8ec4e148
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/8ec4e148

Branch: refs/heads/develop
Commit: 8ec4e148539ab7f71e1b19c4bd7b491b9b803a6f
Parents: 74c4963
Author: Justin Mclean <jm...@apache.org>
Authored: Thu May 2 13:11:30 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu May 2 13:11:30 2013 +1000

----------------------------------------------------------------------
 .../spark/src/spark/components/NumericStepper.as   |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/8ec4e148/frameworks/projects/spark/src/spark/components/NumericStepper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/NumericStepper.as b/frameworks/projects/spark/src/spark/components/NumericStepper.as
index 36a1982..6a45b32 100644
--- a/frameworks/projects/spark/src/spark/components/NumericStepper.as
+++ b/frameworks/projects/spark/src/spark/components/NumericStepper.as
@@ -689,7 +689,10 @@ public class NumericStepper extends Spinner
             textDisplay.maxChars = _maxChars;
             // Restrict to digits, minus sign, decimal point, and comma
             textDisplay.restrict = "0-9\\-\\.\\,";
-            textDisplay.text = value.toString();
+			if (dataFormatter != null)
+          		textDisplay.text = dataFormatter.format(value);
+			else
+				textDisplay.text = value.toString();
             // Set the the textDisplay to be wide enough to display
             // widest possible value. 
             textDisplay.widthInChars = calculateWidestValue(); 
@@ -857,8 +860,10 @@ public class NumericStepper extends Spinner
     {
         if (valueFormatFunction != null)
             textDisplay.text = valueFormatFunction(value);
-        else
-            textDisplay.text = value.toString();
+        else if (dataFormatter != null)
+            textDisplay.text = dataFormatter.format(value);
+		else
+			textDisplay.text = value.toString();
     }
     
     //--------------------------------------------------------------------------