This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 026b560 NS wasn't showing error border. Should fix #732
026b560 is described below
commit 026b560e7d88e38d1bac8544a9d2e2afcf07569d
Author: Alex Harui <[email protected]>
AuthorDate: Mon Feb 24 11:35:05 2020 -0800
NS wasn't showing error border. Should fix #732
---
.../src/main/royale/mx/controls/NumericStepper.as | 20 +++++++++++++++++++-
.../royale/mx/controls/beads/NumericStepperView.as | 6 ++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/NumericStepper.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/NumericStepper.as
index 5be572f..b8cfa42 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/NumericStepper.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/NumericStepper.as
@@ -60,6 +60,7 @@ import mx.styles.StyleProxy;
use namespace mx_internal;
*/
+import mx.controls.beads.NumericStepperView;
//--------------------------------------
// Events
@@ -646,7 +647,24 @@ public class NumericStepper extends UIComponent
//
//--------------------------------------------------------------------------
-
+ private var oldBorderColor:String;
+
+ override public function set errorString(value:String):void
+ {
+ super.errorString = value;
+ COMPILE::JS
+ {
+ if (value)
+ {
+ oldBorderColor = (view as
NumericStepperView).getInput().element.style.borderColor;
+ (view as
NumericStepperView).getInput().element.style.borderColor = "#f00";
+ }
+ else
+ {
+ (view as
NumericStepperView).getInput().element.style.borderColor = oldBorderColor;
+ }
+ }
+ }
}
}
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/NumericStepperView.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/NumericStepperView.as
index f120124..82cf6c3 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/NumericStepperView.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/NumericStepperView.as
@@ -21,6 +21,7 @@ package mx.controls.beads
import mx.core.UIComponent;
import org.apache.royale.core.IStrand;
+ import org.apache.royale.core.IUIBase;
import org.apache.royale.html.beads.NumericStepperView;
/**
@@ -50,5 +51,10 @@ package mx.controls.beads
(value as UIComponent).measuredWidth = 60;
}
}
+
+ public function getInput():IUIBase
+ {
+ return input;
+ }
}
}