You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/09/07 19:24:16 UTC
[10/21] git commit: [flex-asjs] [refs/heads/spark] - Backported to
support review and extra info about variants against current develop branch
All commented out labels in MyIntialView represent errors or non-functioning
bindings. This closes #12
Backported to support review and extra info about variants against current develop branch
All commented out labels in MyIntialView represent errors or non-functioning bindings.
This closes #12
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b59c4cb6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b59c4cb6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b59c4cb6
Branch: refs/heads/spark
Commit: b59c4cb6cee85dc2bba458bff4a13ead9ffe2842
Parents: c62b3ab
Author: greg-dove <gr...@gmail.com>
Authored: Mon Aug 29 14:55:31 2016 +1200
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Aug 29 14:46:52 2016 -0700
----------------------------------------------------------------------
.../DataBindingTestbed/src/MyInitialView.mxml | 80 +++++++++++++++-----
1 file changed, 59 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b59c4cb6/examples/flexjs/DataBindingTestbed/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingTestbed/src/MyInitialView.mxml b/examples/flexjs/DataBindingTestbed/src/MyInitialView.mxml
index 07493f6..3bc2ce5 100644
--- a/examples/flexjs/DataBindingTestbed/src/MyInitialView.mxml
+++ b/examples/flexjs/DataBindingTestbed/src/MyInitialView.mxml
@@ -31,6 +31,7 @@ limitations under the License.
import org.apache.flex.events.CustomEvent;
import org.apache.flex.utils.Timer;
import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.html.Label;
private static var timer:Timer;
private static const STATIC_PRIVATE_CONST :* = "STATIC_PRIVATE_CONST_VAL";
@@ -52,7 +53,6 @@ limitations under the License.
var val:uint = uint(timerText);
val++;
timerText = val.toString();
- // trace('updateTimer',val, timerText);
}
@@ -81,7 +81,6 @@ limitations under the License.
var val:uint = uint(instanceTimerText);
val++;
instanceTimerText = val.toString();
- // trace('updateTimer',val, timerText);
}
@@ -93,15 +92,45 @@ limitations under the License.
initStaticTimer();
trace('initControls');
inst_timer = new Timer(1500);
- inst_timer.addEventListener(Timer.TIMER,updateInstTimer);
- inst_timer.start();
-
- StaticTimer.initStaticTimer();
- instTimer = new InstanceTimer();
+ inst_timer.addEventListener(Timer.TIMER,updateInstTimer);
+ inst_timer.start();
+
+ StaticTimer.initStaticTimer();
+ try{
+ instTimer = new InstanceTimer();
+ } catch (e:Error) {
+ addErrorReport("problem instantiating InstanceTimer ",e);
+ }
+
+ try {
+ var test:Object = new BindableSubVO1()
+ } catch (e:Error) {
+ addErrorReport("problem instantiating BindableSubVO1 ",e);
+ }
+ try {
+ test = new BindableSubVO2()
+ } catch (e:Error) {
+ addErrorReport("problem instantiating BindableSubVO2 ",e);
+ }
+ try {
+ test = new BindableSubVO3()
+ } catch (e:Error) {
+ addErrorReport("problem instantiating BindableSubVO3 ",e);
+ }
+
+
+ }
+
+
+ private function addErrorReport(desc:String,e:Error):void{
+ var label:Label = new Label();
+ label.text = desc +"["+e+"]";
+ errorReporter.addElement(label);
+
}
[Bindable]
- public var instTimer:InstanceTimer ;// = InstanceTimer.getInstance();
+ public var instTimer:InstanceTimer ;
[Bindable]
@@ -152,60 +181,69 @@ limitations under the License.
<js:VerticalLayout />
</js:beads>
<js:Label id="testExplanation" text="These examples are mostly intended for FlexJS dev team to verify various binding functionality" />
- <js:Label id="expressionTest" text="model expression binding (5 sec timer) {MyModel(applicationModel).modelInstanceTime}" />
- <js:Label id="timerDemo2" width="300" text="{'test local static expression '+timerText}" />
- <js:Label id="timerDemo" width="300" text="{'test external static expression '+StaticTimer.static_timerText}" />
+ <js:Label id="expressionTest" text="model expression binding [WORKS](5 sec timer) {MyModel(applicationModel).modelInstanceTime}" />
+ <!--<js:Label id="timerDemo2" width="300" text="{'test local static expression '+timerText}" />-->
+ <!--<js:Label id="timerDemo" width="300" text="{'test external static expression '+StaticTimer.static_timerText}" />-->
<js:Container width="500">
<js:beads>
<js:HorizontalLayout />
</js:beads>
- <js:Label id="timerDemoSB1" text="test local static simplebinding" />
- <js:Label id="timerDemoSB2" text="{timerText}" />
+ <js:Label id="timerDemoSB1" text="test local static simplebinding [BROKEN]" />
+ <!--<js:Label id="timerDemoSB2" text="{timerText}" />-->
</js:Container>
<js:Container width="500">
<js:beads>
<js:HorizontalLayout />
</js:beads>
- <js:Label id="timerDemoSB3" text="test external static simplebinding" />
- <js:Label id="timerDemoSB4" text="{StaticTimer.static_timerText}" />
+ <js:Label id="timerDemoSB3" text="test external static simplebinding [BROKEN]" />
+ <!--<js:Label id="timerDemoSB4" text="{StaticTimer.static_timerText}" />-->
</js:Container>
<js:Container width="500">
<js:beads>
<js:HorizontalLayout />
</js:beads>
- <js:Label id="timerDemoSB5" text="test internal instance simplebinding" />
+ <js:Label id="timerDemoSB5" text="test internal instance simplebinding [WORKS]" />
<js:Label id="timerDemoSB6" text="{instanceTimerText}" />
</js:Container>
<js:Container width="500">
<js:beads>
<js:VerticalLayout />
</js:beads>
- <js:Label id="staticConstDemo1" text="{STATIC_PRIVATE_CONST}" />
+ <js:Label text="[BROKEN] 3 examples of binding into local and external static constants"/>
+ <!--<js:Label id="staticConstDemo1" text="{STATIC_PRIVATE_CONST}" />
<js:Label id="staticConstDemo2" text="{STATIC_PUBLIC_CONST}" />
- <js:Label id="staticConstDemo3" text="{StaticTimer.EXTERNAL_STATIC_CONST}" />
+ <js:Label id="staticConstDemo3" text="{StaticTimer.EXTERNAL_STATIC_CONST}" />-->
</js:Container>
<js:Container width="500">
<js:beads>
<js:VerticalLayout />
</js:beads>
- <js:Label id="instConstDemo1" text="{INSTANCE_PRIVATE_CONST}" />
- <js:Label id="instConstDemo2" text="{INSTANCE_PUBLIC_CONST}" />
+ <js:Label text="[BROKEN] 2 examples of binding into local instance constants"/>
+ <!--<js:Label id="instConstDemo1" text="{INSTANCE_PRIVATE_CONST}" />
+ <js:Label id="instConstDemo2" text="{INSTANCE_PUBLIC_CONST}" />-->
</js:Container>
<js:Container width="500">
<js:beads>
<js:HorizontalLayout />
</js:beads>
- <js:Label id="timerDemoSB7" text="test nested instance timercount" />
+ <js:Label id="timerDemoSB7" text="test nested instance timercount [BROKEN]" />
<js:Label id="timerDemoSB8" text="{instTimer.timerCount}" />
</js:Container>
<js:Container width="500">
<js:beads>
<js:VerticalLayout />
</js:beads>
+ <js:Label text="[BROKEN] 2 examples of binding into an Unbindable parent (compiler warning, one const binding):"/>
<js:Label id="unbindableParentDemo1" text="{unbindableParentInstance.unbindableField}" />
<js:Label id="unbindableParentDemo1b" text="{unbindableParentInstance.unbindableField2}" />
<js:Label id="unbindableParentDemo2" text="{unbindableParentInstance.UNBINDABLE_CONST_FIELD}" />
</js:Container>
+ <js:Container width="500" id="errorReporter">
+ <js:beads>
+ <js:VerticalLayout />
+ </js:beads>
+
+ </js:Container>
</js:Container>
</js:View>