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/02 23:35:56 UTC
[1/5] git commit: [flex-asjs] [refs/heads/develop] - Fix for ant
script in DataBindingTestbed manual test,
and added extra test for IEventDispatcher problem in MyInitialView init
Repository: flex-asjs
Updated Branches:
refs/heads/develop 095bb4f0f -> 22756db33
Fix for ant script in DataBindingTestbed manual test, and added extra test for IEventDispatcher problem in MyInitialView init
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c1203831
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c1203831
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c1203831
Branch: refs/heads/develop
Commit: c12038310333f1c072f129ec1a83453a28c70d55
Parents: 095bb4f
Author: greg-dove <gr...@gmail.com>
Authored: Thu Sep 1 09:35:20 2016 +1200
Committer: greg-dove <gr...@gmail.com>
Committed: Thu Sep 1 09:35:20 2016 +1200
----------------------------------------------------------------------
manualtests/DataBindingTestbed/build.xml | 42 ++++++++++++++++----
.../DataBindingTestbed/src/MyInitialView.mxml | 16 +++++++-
2 files changed, 50 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c1203831/manualtests/DataBindingTestbed/build.xml
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/build.xml b/manualtests/DataBindingTestbed/build.xml
index 6713be4..9a14448 100644
--- a/manualtests/DataBindingTestbed/build.xml
+++ b/manualtests/DataBindingTestbed/build.xml
@@ -20,17 +20,45 @@
<project name="databindingexample" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="../../.."/>
+ <property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="DataBindingTestbed" />
- <property file="${FLEXJS_HOME}/env.properties"/>
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
-
- <include file="${basedir}/../../build_example.xml" />
+ <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+ type="file"
+ property="FALCON_HOME"
+ value="${env.FALCON_HOME}"/>
+
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk/lib/falcon-mxmlc.jar"
+ type="file"
+ property="FALCON_HOME"
+ value="${FLEXJS_HOME}/../flex-falcon/compiler/generated/dist/sdk"/>
+
+ <available file="${env.FALCONJX_HOME}/lib/jsc.jar"
+ type="file"
+ property="FALCONJX_HOME"
+ value="${env.FALCONJX_HOME}"/>
+
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar"
+ type="file"
+ property="FALCONJX_HOME"
+ value="${FLEXJS_HOME}/../flex-falcon/compiler-jx"/>
+
+ <available file="${env.GOOG_HOME}/closure/goog/base.js"
+ type="file"
+ property="GOOG_HOME"
+ value="${env.GOOG_HOME}"/>
+ <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js"
+ type="file"
+ property="GOOG_HOME"
+ value="${FLEXJS_HOME}/js/lib/google/closure-library"/>
+
+ <include file="${basedir}/../build_example.xml" />
+
<target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
</target>
@@ -38,8 +66,8 @@
<delete dir="${basedir}/bin" failonerror="false" />
<delete dir="${basedir}/bin-debug" failonerror="false" />
<delete dir="${basedir}/bin-release" failonerror="false" />
- <delete dir="${basedir}/target" failonerror="false" />
- </target>
+ </target>
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c1203831/manualtests/DataBindingTestbed/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/src/MyInitialView.mxml b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
index 286c097..c5005be 100644
--- a/manualtests/DataBindingTestbed/src/MyInitialView.mxml
+++ b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
@@ -107,11 +107,25 @@ limitations under the License.
} catch (e:Error) {
addErrorReport("problem instantiating BindableSubVO1 ",e);
}
+ test=null;
try {
- test = new BindableSubVO2()
+ test = new BindableSubVO2();
} catch (e:Error) {
addErrorReport("problem instantiating BindableSubVO2 ",e);
}
+
+ try {
+ if (test) {
+ //remove the EventDispatcher constructor hack in js
+ // if (test.fireListeners) delete test.fireListeners;
+ test.fieldofBindableSubVO2 = "otherValue";
+ }
+
+ } catch (e:Error) {
+ addErrorReport("problem dispatching events on BindableSubVO2 ",e);
+ }
+
+ test=null;
try {
test = new BindableSubVO3()
} catch (e:Error) {
[5/5] git commit: [flex-asjs] [refs/heads/develop] - [MINOR] spaces
vs. tabs for consistency
Posted by ah...@apache.org.
[MINOR] spaces vs. tabs for consistency
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/22756db3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/22756db3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/22756db3
Branch: refs/heads/develop
Commit: 22756db330967f40dfe21e22cb917260c7aaf271
Parents: ec4e914
Author: greg-dove <gr...@gmail.com>
Authored: Sat Sep 3 10:08:40 2016 +1200
Committer: greg-dove <gr...@gmail.com>
Committed: Sat Sep 3 10:08:40 2016 +1200
----------------------------------------------------------------------
manualtests/build_example.xml | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22756db3/manualtests/build_example.xml
----------------------------------------------------------------------
diff --git a/manualtests/build_example.xml b/manualtests/build_example.xml
index ab8f0a8..0001365 100644
--- a/manualtests/build_example.xml
+++ b/manualtests/build_example.xml
@@ -45,9 +45,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
</mxmlc>
@@ -97,9 +97,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
</mxmlc>
@@ -137,9 +137,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
</mxmlc>
@@ -175,9 +175,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="${extlib_arg}" />
@@ -219,9 +219,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="${extlib_arg}" />
@@ -264,9 +264,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
- <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
- <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="${extlib_arg}" />
[2/5] git commit: [flex-asjs] [refs/heads/develop] - removed the
pom.xml to make it consistent with other manual tests.
Posted by ah...@apache.org.
removed the pom.xml to make it consistent with other manual tests.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8f33c645
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8f33c645
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8f33c645
Branch: refs/heads/develop
Commit: 8f33c645c8d1f19efed6a7840a22c6798747ab7e
Parents: c120383
Author: greg-dove <gr...@gmail.com>
Authored: Thu Sep 1 09:52:39 2016 +1200
Committer: greg-dove <gr...@gmail.com>
Committed: Thu Sep 1 09:52:39 2016 +1200
----------------------------------------------------------------------
manualtests/DataBindingTestbed/pom.xml | 68 -----------------------------
1 file changed, 68 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f33c645/manualtests/DataBindingTestbed/pom.xml
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/pom.xml b/manualtests/DataBindingTestbed/pom.xml
deleted file mode 100644
index 66f3199..0000000
--- a/manualtests/DataBindingTestbed/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.flex.flexjs.examples</groupId>
- <artifactId>examples-flexjs</artifactId>
- <version>0.7.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>DataBindingTestbed</artifactId>
- <version>0.7.0-SNAPSHOT</version>
- <packaging>swf</packaging>
-
- <name>Apache Flex - FlexJS: Examples: FlexJS: DataBindingTestbed</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.flex.flexjs.compiler</groupId>
- <artifactId>flexjs-maven-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <mainClass>DataBindingTestbed.mxml</mainClass>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>com.adobe.flash.framework</groupId>
- <artifactId>playerglobal</artifactId>
- <version>${flash.version}</version>
- <type>swc</type>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
-</project>
[3/5] git commit: [flex-asjs] [refs/heads/develop] - [MANUAL TESTS]
Fix bad mxml in DatabindingTestbed, added one extra binding test,
and also extra binding-related config settings to shared ant targets
Posted by ah...@apache.org.
[MANUAL TESTS] Fix bad mxml in DatabindingTestbed, added one extra binding test, and also extra binding-related config settings to shared ant targets
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ed100b77
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ed100b77
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ed100b77
Branch: refs/heads/develop
Commit: ed100b77c59c63122cc6ac9908af1e3c36485fe9
Parents: 8f33c64
Author: greg-dove <gr...@gmail.com>
Authored: Sat Sep 3 08:40:23 2016 +1200
Committer: greg-dove <gr...@gmail.com>
Committed: Sat Sep 3 08:40:23 2016 +1200
----------------------------------------------------------------------
.../DataBindingTestbed/src/MyInitialView.mxml | 19 ++++++++---
.../src/bindables/BindableMxmlTest.as | 33 ++++++++++++++++++++
manualtests/build_example.xml | 18 +++++++++++
3 files changed, 66 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed100b77/manualtests/DataBindingTestbed/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/src/MyInitialView.mxml b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
index c5005be..3f16bfa 100644
--- a/manualtests/DataBindingTestbed/src/MyInitialView.mxml
+++ b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
@@ -19,8 +19,13 @@ limitations under the License.
-->
<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic"
+ xmlns:bindables="bindables.*"
initComplete="initControls()">
- <fx:Script>
+
+ <fx:Declarations>
+ <bindables:BindableMxmlTest id="mxmlTest" />
+ </fx:Declarations>
+ <fx:Script>
<![CDATA[
import models.MyModel;
import bindables.StaticTimer;
@@ -227,7 +232,7 @@ limitations under the License.
<js:Label text="[WORKS] 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>
@@ -248,11 +253,17 @@ limitations under the License.
<js:beads>
<js:VerticalLayout />
</js:beads>
- <js:Label text="[WORKS] 2 examples of binding into an Unbindable parent (compiler warning, one const binding):"/>
+ <js:Label text="[WORKS] 2 examples of var binding and 1 const binding into an Unbindable parent (2 compiler warnings):"/>
<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">
+ <js:beads>
+ <js:VerticalLayout />
+ </js:beads>
+ <js:Label text="[WORKS] binding into local mxml instance of local bindable actionscript class:"/>
+ <js:Label id="mxmlBindableDemo1" text="{mxmlTest.fieldofBindableMxmlTest}" />
</js:Container>
<js:Container width="500" id="errorReporter">
<js:beads>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed100b77/manualtests/DataBindingTestbed/src/bindables/BindableMxmlTest.as
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/src/bindables/BindableMxmlTest.as b/manualtests/DataBindingTestbed/src/bindables/BindableMxmlTest.as
new file mode 100644
index 0000000..84dde8a
--- /dev/null
+++ b/manualtests/DataBindingTestbed/src/bindables/BindableMxmlTest.as
@@ -0,0 +1,33 @@
+0.////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package bindables
+{
+
+ public class BindableMxmlTest
+ {
+
+
+
+ [Bindable]
+ public var fieldofBindableMxmlTest:String = "fieldofBindableMxmlTest_value";
+
+
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ed100b77/manualtests/build_example.xml
----------------------------------------------------------------------
diff --git a/manualtests/build_example.xml b/manualtests/build_example.xml
index 45714d1..ab8f0a8 100644
--- a/manualtests/build_example.xml
+++ b/manualtests/build_example.xml
@@ -45,6 +45,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
</mxmlc>
@@ -94,6 +97,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
</mxmlc>
@@ -131,6 +137,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
</mxmlc>
@@ -166,6 +175,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="${extlib_arg}" />
@@ -207,6 +219,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="${extlib_arg}" />
@@ -249,6 +264,9 @@
<arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
<arg value="-compiler.binding-value-change-event-type=valueChange" />
+ <arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
+ <arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
+ <arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="${extlib_arg}" />
[4/5] git commit: [flex-asjs] [refs/heads/develop] - [IMPROVEMENT]
Fix of EventDispatcher to support IEventDispatcher implementations,
without earlier constructor hack. Added a quick verification test to the
DatabindingTestbed test
Posted by ah...@apache.org.
[IMPROVEMENT] Fix of EventDispatcher to support IEventDispatcher implementations, without earlier constructor hack. Added a quick verification test to the DatabindingTestbed test
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ec4e914e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ec4e914e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ec4e914e
Branch: refs/heads/develop
Commit: ec4e914e67160addc5494d3bd666aed6cfd1d362
Parents: ed100b7
Author: greg-dove <gr...@gmail.com>
Authored: Sat Sep 3 09:35:34 2016 +1200
Committer: greg-dove <gr...@gmail.com>
Committed: Sat Sep 3 09:35:34 2016 +1200
----------------------------------------------------------------------
.../org/apache/flex/events/EventDispatcher.as | 32 +++++----
.../DataBindingTestbed/src/MyInitialView.mxml | 71 ++++++++++++++++----
2 files changed, 75 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec4e914e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
index d4bc1a9..0d2b081 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
@@ -59,22 +59,11 @@ package org.apache.flex.events
COMPILE::JS
public class EventDispatcher extends goog.events.EventTarget implements IEventDispatcher
{
+
+ private var _target:IEventDispatcher;
public function EventDispatcher(target:IEventDispatcher = null)
{
- if (target != null) {
- setTargetForTesting(target);
- //the following can be required with IEventDispatcher implementation instead of extending EventDispatcher
- //(fireListeners is not required by IEventDispatcher, but is called on the 'currentTarget'
- //by the ancestor goog.events.EventTarget code)
- var obj:Object = target;
- if (!obj.fireListeners) {
- var me:EventDispatcher = this;
- obj.fireListeners = function ():* {
- me.fireListeners.apply(me,arguments);
- };
- }
- }
-
+ _target = target || this;
}
public function hasEventListener(type:String):Boolean
@@ -86,6 +75,21 @@ package org.apache.flex.events
{
try
{
+ //we get quite a few string events here, "initialize" etc
+ //so this general approach doesn't work:
+ //event.target = _target;
+ if (event) {
+ if (typeof event == "string") {
+ event = new Event(event as String);
+ event.target = _target;
+ //console.log("created event from string ",event);
+ }
+ else if ("target" in event) {
+ event.target = _target;
+ //console.log("assigned target to event ",event);
+ }
+ } else return false;
+
return super.dispatchEvent(event);
}
catch (e:Error)
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec4e914e/manualtests/DataBindingTestbed/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/src/MyInitialView.mxml b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
index 3f16bfa..3f788fe 100644
--- a/manualtests/DataBindingTestbed/src/MyInitialView.mxml
+++ b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
@@ -102,42 +102,85 @@ limitations under the License.
StaticTimer.initStaticTimer();
try{
- instTimer = new InstanceTimer();
+ instTimer = new InstanceTimer();
} catch (e:Error) {
addErrorReport("problem instantiating InstanceTimer ",e);
}
+ try{
+ if (instTimer) {
+ Object(instTimer).addEventListener("testinstTimer",testEventTarget);
+ _expectedTarget=instTimer;
+ Object(instTimer).dispatchEvent(new Event("testinstTimer"));
+ Object(instTimer).removeEventListener("testinstTimer",testEventTarget);
+ }
+ } catch (e:Error) {
+ addErrorReport("problem with explicit dispatching from InstanceTimer ",e);
+ }
try {
var test:Object = new BindableSubVO1()
} catch (e:Error) {
addErrorReport("problem instantiating BindableSubVO1 ",e);
}
+
+ try{
+ if (test) {
+ test.addEventListener("testBindableSubVO1",testEventTarget);
+ _expectedTarget=test;
+ test.dispatchEvent(new Event("testBindableSubVO1"));
+ test.removeEventListener("testBindableSubVO1",testEventTarget);
+
+ }
+ } catch (e:Error) {
+ addErrorReport("problem with explicit dispatching from BindableSubVO1 ",e);
+ }
+
+
test=null;
try {
- test = new BindableSubVO2();
+ test = new BindableSubVO2();
} catch (e:Error) {
addErrorReport("problem instantiating BindableSubVO2 ",e);
}
-
- try {
- if (test) {
- //remove the EventDispatcher constructor hack in js
- // if (test.fireListeners) delete test.fireListeners;
- test.fieldofBindableSubVO2 = "otherValue";
- }
-
+
+ try{
+ if (test) {
+ test.addEventListener("testBindableSubVO2",testEventTarget);
+ _expectedTarget=test;
+ test.dispatchEvent(new Event("testBindableSubVO2"));
+ test.removeEventListener("testBindableSubVO2",testEventTarget);
+
+ }
} catch (e:Error) {
- addErrorReport("problem dispatching events on BindableSubVO2 ",e);
+ addErrorReport("problem with explicit dispatching from BindableSubVO2 ",e);
}
-
- test=null;
+
+
+ test=null;
try {
test = new BindableSubVO3()
} catch (e:Error) {
addErrorReport("problem instantiating BindableSubVO3 ",e);
}
+ try{
+ if (test) {
+ test.addEventListener("testBindableSubVO3",testEventTarget);
+ _expectedTarget=test;
+ test.dispatchEvent(new Event("testBindableSubVO3"));
+ test.removeEventListener("testBindableSubVO3",testEventTarget);
+
+ }
+ } catch (e:Error) {
+ addErrorReport("problem with explicit dispatching from BindableSubVO3 ",e);
+ }
-
+ }
+
+ private var _expectedTarget:Object;
+ private function testEventTarget(event:Event):void{
+ if (event.target!=_expectedTarget) {
+ addErrorReport("unexpected event target "+event.type,new Error("unexpected event target"));
+ }
}