flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [14/25] git commit: [flex-asjs] [refs/heads/refactor-sprite] - 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.
Date Tue, 06 Sep 2016 06:18:02 GMT
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.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2c3ac891
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2c3ac891
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2c3ac891

Branch: refs/heads/refactor-sprite
Commit: 2c3ac891661e218aaf1337dcc92d10218dc8f123
Parents: c62b3ab
Author: greg-dove <greg.dove@gmail.com>
Authored: Mon Aug 29 14:55:31 2016 +1200
Committer: greg-dove <greg.dove@gmail.com>
Committed: Mon Aug 29 14:55:31 2016 +1200

----------------------------------------------------------------------
 .../DataBindingTestbed/src/MyInitialView.mxml   | 80 +++++++++++++++-----
 1 file changed, 59 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2c3ac891/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>


Mime
View raw message