Merge branch 'develop' into feature/dragAndDrop
* develop: (24 commits)
Allow chained assignment to non-existent children
Add MDLDynamicTableExample to ilustrate how add/remove items to MDL Table - Currently only adding is working. The rest job will be done as part of FLEX-35354
Forgot header
Returns parameter passed into setAttribute and setChild to enable chained assignment of values.
Added missing pieces for TextBlock management Fixed bug in GroupElement.replaceElements()
Added helper function
FLEX-35354 - Rename TabsItemRendererFactoryForArrayListData to TabsDynamicItemsRendererFactoryForArrayListData - Update TabsDynamicItemsRendererFactoryForArrayListData with new implementation of DynamicItemsRendererFactoryForArrayListData - Update example MDLDynamicTabsExample
FLEX-35354 - Add DynamicItemsRendererFactoryForArrayListData to allow add items dynamically to MDL Table - Bead can be used in other components - Update TabsItemRendererFactoryForArrayListData with new DynamicItemsRendererFactoryForArrayListData
Switch MDLDynamicTabsExample to JSFlex only build in Maven
“Stringables” should be assignable to XML
Partially fixed FormatExample
Fixed a few errors in DataGridXcompile
Fixed TLFEditTestFlexJS manual test
Added maven build for UnitTests
-refactored ant builds of manual tests to be closer to examples, and support for 'maven_compat' from test level ant scripts. -renamed GenericTests to UnitTests and fixed some display issues due to layout changes etc
Quick fix for FormExample (avoid 0 width, 0 height clipping)
Quick fix for ListsTest
Quick fix for ImageTest
FLEX-35350 - THead and TBody need to be created a bit early cause MDL complaining with NPE when dataProvider is null
quick fix to get compiling and something displaying
...
diff --git a/examples/flexjs/MDLDynamicTableExample/pom.xml b/examples/flexjs/MDLDynamicTableExample/pom.xml
new file mode 100644
index 0000000..c1603a0
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/pom.xml
@@ -0,0 +1,74 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.flex.flexjs.examples</groupId>
+ <artifactId>examples-flexjs</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>MDLDynamicTableExample</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>swf</packaging>
+
+ <name>Apache Flex - FlexJS: Examples: FlexJS: MDLDynamicTableExample</name>
+
+ <properties>
+ <!-- Customize MDL colors using this the tool at : https://getmdl.io/customize/index.html -->
+ <primary>indigo</primary>
+ <accent>pink</accent>
+ </properties>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>flexjs-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <mainClass>MDLDynamicTableExample.mxml</mainClass>
+ <targets>JSFlex</targets>
+ <htmlTemplate>${basedir}/target/javascript/bin/js-debug/mdl-js-index-template.html</htmlTemplate>
+ <additionalCompilerOptions>-compiler.exclude-defaults-css-files=Basic-0.9.0-SNAPSHOT-js.swc:defaults.css</additionalCompilerOptions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>MaterialDesignLite</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/examples/flexjs/MDLDynamicTableExample/src/MDLDynamicTableExample.mxml b/examples/flexjs/MDLDynamicTableExample/src/MDLDynamicTableExample.mxml
new file mode 100644
index 0000000..4e2a329
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/src/MDLDynamicTableExample.mxml
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/flexjs/basic"
+ xmlns:local="*">
+
+ <fx:Style source="resources/mdl-styles.css"/>
+
+ <js:valuesImpl>
+ <js:SimpleCSSValuesImpl />
+ </js:valuesImpl>
+
+ <js:initialView>
+ <js:View width="100%" height="100%">
+ <local:MainView />
+ </js:View>
+ </js:initialView>
+
+ </js:Application>
\ No newline at end of file
diff --git a/examples/flexjs/MDLDynamicTableExample/src/MainView.mxml b/examples/flexjs/MDLDynamicTableExample/src/MainView.mxml
new file mode 100644
index 0000000..95691fb
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/src/MainView.mxml
@@ -0,0 +1,65 @@
+<?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.
+
+-->
+<mdl:Grid xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/flexjs/basic"
+ xmlns:mdl="library://ns.apache.org/flexjs/mdl" xmlns:models="models.*">
+
+ <fx:Script>
+ <![CDATA[
+ import vo.UserVO;
+
+ private function onAddEmployeeClick(event:MouseEvent):void
+ {
+ usersListModel.users.addItem(new UserVO("piotrz", "Piotr", "Zarzycki", "piotrz@apache.org"));
+ }
+ ]]>
+ </fx:Script>
+
+ <mdl:beads>
+ <js:ContainerDataBinding/>
+ </mdl:beads>
+
+ <mdl:model>
+ <models:UserListModel id="usersListModel"/>
+ </mdl:model>
+
+ <mdl:GridCell column="12">
+ <mdl:Table id="tblUsers" shadow="2"
+ dataProvider="{usersListModel.users}" className="customTableStyle">
+ <mdl:columns>
+ <mdl:TableColumn headerText="Username" />
+ <mdl:TableColumn headerText="First Name"/>
+ <mdl:TableColumn headerText="Last Name"/>
+ <mdl:TableColumn headerText="Email"/>
+ </mdl:columns>
+ <mdl:beads>
+ <!--Bead for listening changes of collection source-->
+ <js:DataProviderCollectionChangeNotifier sourceID="usersListModel" propertyName="users"
+ destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
+ <!--Bead for listening items events changes-->
+ <js:DataProviderItemsChangeNotifier sourceID="usersListModel" propertyName="users"
+ destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
+ </mdl:beads>
+ </mdl:Table>
+ </mdl:GridCell>
+ <mdl:GridCell>
+ <mdl:Button text="Add Employee" width="100" click="onAddEmployeeClick(event)"/>
+ </mdl:GridCell>
+</mdl:Grid>
\ No newline at end of file
diff --git a/examples/flexjs/MDLDynamicTableExample/src/itemRenderers/CustomTableRowItemRenderer.mxml b/examples/flexjs/MDLDynamicTableExample/src/itemRenderers/CustomTableRowItemRenderer.mxml
new file mode 100644
index 0000000..cf92588
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/src/itemRenderers/CustomTableRowItemRenderer.mxml
@@ -0,0 +1,46 @@
+<?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.
+
+-->
+<mdl:TableRowItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/flexjs/basic"
+ xmlns:mdl="library://ns.apache.org/flexjs/mdl"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <fx:Script>
+ <![CDATA[
+ import vo.UserVO;
+
+ [Bindable("dataChange")]
+ public function get userVO():UserVO
+ {
+ return data as UserVO;
+ }
+ ]]>
+ </fx:Script>
+
+ <mdl:beads>
+ <js:ItemRendererDataBinding />
+ </mdl:beads>
+
+ <mdl:TableCell text="{userVO.username}"/>
+ <mdl:TableCell text="{userVO.firstName}"/>
+ <mdl:TableCell text="{userVO.lastName}"/>
+ <mdl:TableCell text="{userVO.email}"/>
+
+</mdl:TableRowItemRenderer>
\ No newline at end of file
diff --git a/examples/flexjs/MDLDynamicTableExample/src/models/UserListModel.as b/examples/flexjs/MDLDynamicTableExample/src/models/UserListModel.as
new file mode 100644
index 0000000..3952312
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/src/models/UserListModel.as
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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 models
+{
+ import org.apache.flex.collections.ArrayList;
+ import vo.UserVO;
+
+ [Bindable]
+ public class UserListModel
+ {
+ private var _users:ArrayList = new ArrayList([
+ new UserVO("lstooge","Larry", "Stooge", "larry@stooges.com" ),
+ new UserVO("cstooge","Curly", "Stooge", "curly@stooges.com" )
+ ]);
+
+ public function get users():ArrayList
+ {
+ return _users
+ }
+ }
+}
\ No newline at end of file
diff --git a/examples/flexjs/MDLDynamicTableExample/src/resources/mdl-js-index-template.html b/examples/flexjs/MDLDynamicTableExample/src/resources/mdl-js-index-template.html
new file mode 100644
index 0000000..f21943f
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/src/resources/mdl-js-index-template.html
@@ -0,0 +1,33 @@
+<!--
+ 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.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Custom Template for injecting custom style CSS">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
+ <link rel="stylesheet" type="text/css" href="${application}.css">
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
+ <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.min.css">
+ <script src="https://code.getmdl.io/1.3.0/material.min.js"></script>
+${head}
+</head>
+<body>
+${body}
+</body>
+</html>
\ No newline at end of file
diff --git a/examples/flexjs/MDLDynamicTableExample/src/resources/mdl-styles.css b/examples/flexjs/MDLDynamicTableExample/src/resources/mdl-styles.css
new file mode 100644
index 0000000..5e15f22
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/src/resources/mdl-styles.css
@@ -0,0 +1,31 @@
+/*
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+*/
+
+@namespace "http://www.w3.org/1999/xhtml";
+@namespace js "library://ns.apache.org/flexjs/basic";
+@namespace mdl "library://ns.apache.org/flexjs/mdl";
+
+.customTableStyle
+{
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.DynamicItemsRendererFactoryForArrayListData");
+ IItemRenderer: ClassReference("itemRenderers.CustomTableRowItemRenderer");
+}
+
diff --git a/examples/flexjs/MDLDynamicTableExample/src/vo/UserVO.as b/examples/flexjs/MDLDynamicTableExample/src/vo/UserVO.as
new file mode 100644
index 0000000..6181ab8
--- /dev/null
+++ b/examples/flexjs/MDLDynamicTableExample/src/vo/UserVO.as
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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 vo
+{
+ [Bindable]
+ public class UserVO
+ {
+ public var username:String;
+ public var firstName:String;
+ public var lastName:String;
+ public var email:String;
+
+ public function UserVO(username:String = null,
+ firstName:String = null,
+ lastName:String = null,
+ email:String = null)
+ {
+ this.username = username;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.email = email;
+ }
+ }
+}
\ No newline at end of file
diff --git a/examples/flexjs/MDLDynamicTabsExample/pom.xml b/examples/flexjs/MDLDynamicTabsExample/pom.xml
index db429a1..f21bcf0 100644
--- a/examples/flexjs/MDLDynamicTabsExample/pom.xml
+++ b/examples/flexjs/MDLDynamicTabsExample/pom.xml
@@ -47,6 +47,7 @@
<extensions>true</extensions>
<configuration>
<mainClass>TabsExample.mxml</mainClass>
+ <targets>JSFlex</targets>
<removeCirculars>true</removeCirculars>
<htmlTemplate>${basedir}/target/javascript/bin/js-debug/mdl-js-index-template.html</htmlTemplate>
<additionalCompilerOptions>-compiler.exclude-defaults-css-files=Basic-0.9.0-SNAPSHOT-js.swc:defaults.css</additionalCompilerOptions>
@@ -56,22 +57,6 @@
</build>
<dependencies>
- <!-- Needed for Flash compilation -->
- <dependency>
- <groupId>com.adobe.flash.framework</groupId>
- <artifactId>playerglobal</artifactId>
- <version>20.0</version>
- <type>swc</type>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.flex.flexjs.framework</groupId>
- <artifactId>MaterialDesignLite</artifactId>
- <version>0.9.0-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
<dependency>
<groupId>org.apache.flex.flexjs.framework</groupId>
<artifactId>MaterialDesignLite</artifactId>
@@ -79,7 +64,6 @@
<type>swc</type>
<classifier>js</classifier>
</dependency>
-
</dependencies>
</project>
diff --git a/examples/flexjs/MDLDynamicTabsExample/src/main/flex/views/InitialView.mxml b/examples/flexjs/MDLDynamicTabsExample/src/main/flex/views/InitialView.mxml
index 5523b6f..1482982 100644
--- a/examples/flexjs/MDLDynamicTabsExample/src/main/flex/views/InitialView.mxml
+++ b/examples/flexjs/MDLDynamicTabsExample/src/main/flex/views/InitialView.mxml
@@ -39,14 +39,18 @@
<mdl:model>
<models:TabsModel id="tabsModel"/>
</mdl:model>
- <mdl:Tabs id="myTabs" selectedIndex="1" tabIdField="tabId" labelField="label" className="customTabs"
- dataProvider="{tabsModel.tabs}" width="500">
- <mdl:beads>
- <js:DataProviderCollectionChangeNotifier sourceID="tabsModel" propertyName="tabs"
- destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
- <js:DataProviderItemsChangeNotifier sourceID="tabsModel" propertyName="tabs"
- destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
- </mdl:beads>
- </mdl:Tabs>
- <mdl:Button text="Add new Tab" click="onAddNewTabClick(event)"/>
+ <mdl:GridCell column="6">
+ <mdl:Tabs id="myTabs" selectedIndex="1" tabIdField="tabId" labelField="label" className="customTabs"
+ dataProvider="{tabsModel.tabs}" width="500">
+ <mdl:beads>
+ <js:DataProviderCollectionChangeNotifier sourceID="tabsModel" propertyName="tabs"
+ destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
+ <js:DataProviderItemsChangeNotifier sourceID="tabsModel" propertyName="tabs"
+ destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
+ </mdl:beads>
+ </mdl:Tabs>
+ </mdl:GridCell>
+ <mdl:GridCell>
+ <mdl:Button text="Add new Tab" click="onAddNewTabClick(event)"/>
+ </mdl:GridCell>
</mdl:Grid>
\ No newline at end of file
diff --git a/examples/flexjs/MDLDynamicTabsExample/src/main/resources/mdl-styles.css b/examples/flexjs/MDLDynamicTabsExample/src/main/resources/mdl-styles.css
index 8d52a54..e713389 100644
--- a/examples/flexjs/MDLDynamicTabsExample/src/main/resources/mdl-styles.css
+++ b/examples/flexjs/MDLDynamicTabsExample/src/main/resources/mdl-styles.css
@@ -27,5 +27,5 @@
{
IItemRenderer: ClassReference("itemRenderers.CustomTabBarPanelItemRenderer");
IBeadModel: ClassReference("org.apache.flex.mdl.beads.models.TabArrayListModel");
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayListData");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsDynamicItemsRendererFactoryForArrayListData");
}
\ No newline at end of file
diff --git a/examples/flexjs/pom.xml b/examples/flexjs/pom.xml
index 2de6a5a..a749153 100644
--- a/examples/flexjs/pom.xml
+++ b/examples/flexjs/pom.xml
@@ -53,6 +53,7 @@
<!--module>MDLBlogExample</module>-->
<module>MDLDynamicTabsExample</module>
<module>MDLExample</module>
+ <module>MDLDynamicTableExample</module>
<module>ModuleExample</module>
<module>MobileMap</module>
<module>MobileStocks</module>
diff --git a/frameworks/projects/Basic/src/main/flex/BasicClasses.as b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
index e58f2cf..9abaf14 100644
--- a/frameworks/projects/Basic/src/main/flex/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
@@ -27,6 +27,10 @@
*/
internal class BasicClasses
{
+ COMPILE::JS
+ {
+ import org.apache.flex.html.addElementToWrapper; addElementToWrapper;
+ }
import org.apache.flex.html.ToolTip; ToolTip;
import org.apache.flex.html.accessories.NumericOnlyTextInputBead; NumericOnlyTextInputBead;
import org.apache.flex.html.beads.DispatchInputFinishedBead; DispatchInputFinishedBead;
@@ -158,6 +162,7 @@
import org.apache.flex.html.beads.layouts.TileLayout; TileLayout;
import org.apache.flex.html.beads.TextItemRendererFactoryForArrayData; TextItemRendererFactoryForArrayData;
import org.apache.flex.html.beads.DataItemRendererFactoryForArrayData; DataItemRendererFactoryForArrayData;
+ import org.apache.flex.html.beads.DynamicItemsRendererFactoryForArrayListData; DynamicItemsRendererFactoryForArrayListData;
import org.apache.flex.html.beads.DataItemRendererFactoryForArrayList; DataItemRendererFactoryForArrayList;
import org.apache.flex.html.beads.DataItemRendererFactoryForHierarchicalData; DataItemRendererFactoryForHierarchicalData;
import org.apache.flex.html.supportClasses.DataGroup; DataGroup;
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/ToggleTextButton.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/ToggleTextButton.as
index 6061898..8718a6f 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/ToggleTextButton.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/ToggleTextButton.as
@@ -85,10 +85,6 @@
{
addEventListener(MouseEvent.CLICK, internalMouseHandler);
}
- COMPILE::JS
- {
- this.typeNames = 'toggleTextButton';
- }
}
private var _selected:Boolean = false;
@@ -130,9 +126,7 @@
if (_selected != value)
{
_selected = value;
-
internalSelected();
-
dispatchEvent(new Event("change"));
}
}
@@ -177,26 +171,15 @@
COMPILE::JS
{
var isToggleTextButtonSelected:Boolean = element.classList.contains("toggleTextButton_Selected");
- if (!isToggleTextButtonSelected && _selected == true)
- {
- element.classList.add("toggleTextButton_Selected");
- }
- else if (isToggleTextButtonSelected && _selected == false)
- {
+ //sync the class with the state
+ if(isToggleTextButtonSelected != _selected)
element.classList.toggle("toggleTextButton_Selected");
- }
var isToggleTextButton:Boolean = element.classList.contains("toggleTextButton");
- if (!isToggleTextButton && _selected == false)
- {
- element.classList.add("toggleTextButton");
- }
- else if (isToggleTextButton && _selected == true)
- {
+ // Need to toggle if we have the class and it's selected or we don't and it's not selected.
+ if(isToggleTextButton == _selected)
element.classList.toggle("toggleTextButton");
- }
- typeNames = element.className;
}
}
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/addElementToWrapper.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/addElementToWrapper.as
new file mode 100644
index 0000000..f7638ba
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/addElementToWrapper.as
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 org.apache.flex.html
+{
+ COMPILE::JS
+ {
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ public function addElementToWrapper(wrapper:UIBase,type:String):WrappedHTMLElement
+ {
+ var elem:WrappedHTMLElement = document.createElement(type) as WrappedHTMLElement;
+ wrapper.positioner = wrapper.element = elem;
+ elem.flexjs_wrapper = wrapper;
+ return elem;
+ }
+}
\ No newline at end of file
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DynamicItemsRendererFactoryForArrayListData.as
similarity index 72%
rename from frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
rename to frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DynamicItemsRendererFactoryForArrayListData.as
index c323332..6ccd952 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsItemRendererFactoryForArrayListData.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DynamicItemsRendererFactoryForArrayListData.as
@@ -16,7 +16,7 @@
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mdl.beads
+package org.apache.flex.html.beads
{
import org.apache.flex.collections.IArrayList;
import org.apache.flex.core.IBead;
@@ -33,35 +33,34 @@
import org.apache.flex.events.EventDispatcher;
import org.apache.flex.events.IEventDispatcher;
import org.apache.flex.html.beads.IListView;
- import org.apache.flex.mdl.beads.models.ITabModel;
- import org.apache.flex.mdl.supportClasses.ITabItemRenderer;
import org.apache.flex.events.Event;
+ import org.apache.flex.core.ISelectableItemRenderer;
+ import org.apache.flex.core.ISelectionModel;
[Event(name="itemRendererCreated",type="org.apache.flex.events.ItemRendererEvent")]
/**
- * The TabsItemRendererFactoryForArrayListData class reads an
+ * The DynamicItemsRendererFactoryForArrayListData class reads an
* array of data and creates an item renderer for every
- * ITabItemRenderer in the array.
+ * ISelectableItemRenderer in the array.
*
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
- * @productversion FlexJS 0.8
+ * @productversion FlexJS 0.9
*/
- public class TabsItemRendererFactoryForArrayListData extends EventDispatcher implements IBead, IDataProviderItemRendererMapper
+ public class DynamicItemsRendererFactoryForArrayListData extends EventDispatcher implements IBead, IDataProviderItemRendererMapper
{
- public function TabsItemRendererFactoryForArrayListData(target:Object = null)
+ public function DynamicItemsRendererFactoryForArrayListData(target:Object = null)
{
super(target);
}
- protected var dataProviderModel:ITabModel;
+ protected var dataProviderModel:ISelectionModel;
protected var labelField:String;
- protected var tabsIdField:String;
- private var _strand:IStrand;
+ protected var _strand:IStrand;
/**
* @copy org.apache.flex.core.IBead#strand
@@ -74,7 +73,7 @@
public function set strand(value:IStrand):void
{
_strand = value;
- IEventDispatcher(value).addEventListener("initComplete",finishSetup);
+ IEventDispatcher(value).addEventListener("initComplete", initComplete);
}
/**
@@ -85,17 +84,16 @@
* @playerversion AIR 2.6
* @productversion FlexJS 0.8
*/
- private function finishSetup(event:Event):void
+ protected function initComplete(event:Event):void
{
- IEventDispatcher(_strand).removeEventListener("initComplete",finishSetup);
+ IEventDispatcher(_strand).removeEventListener("initComplete", initComplete);
- dataProviderModel = _strand.getBeadByType(ITabModel) as ITabModel;
+ dataProviderModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
var listView:IListView = _strand.getBeadByType(IListView) as IListView;
dataGroup = listView.dataGroup;
dataProviderModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
dataProviderModel.addEventListener(CollectionEvent.ITEM_ADDED, itemAddedHandler);
- tabsIdField = dataProviderModel.tabIdField;
labelField = dataProviderModel.labelField;
dataProviderChangeHandler(null);
@@ -157,50 +155,46 @@
var n:int = dp.length;
for (var i:int = 0; i < n; i++)
{
- var ir:ITabItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITabItemRenderer;
- dataGroup.addItemRenderer(ir);
- ir.index = i;
- ir.labelField = labelField;
- ir.tabIdField = tabsIdField;
-
- if (presentationModel) {
- var style:SimpleCSSStyles = new SimpleCSSStyles();
- style.marginBottom = presentationModel.separatorThickness;
- UIBase(ir).style = style;
- UIBase(ir).height = presentationModel.rowHeight;
- UIBase(ir).percentWidth = 100;
- }
- ir.data = dp.getItemAt(i);
+ var ir:ISelectableItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ISelectableItemRenderer;
+ var item:Object = dp.getItemAt(i);
+ fillRenderer(i, item, ir, presentationModel);
}
IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
}
- private function itemAddedHandler(event:CollectionEvent):void
+ protected function itemAddedHandler(event:CollectionEvent):void
{
var dp:IArrayList = dataProviderModel.dataProvider as IArrayList;
if (!dp)
return;
var presentationModel:IListPresentationModel = _strand.getBeadByType(IListPresentationModel) as IListPresentationModel;
+ var ir:ISelectableItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ISelectableItemRenderer;
- var ir:ITabItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITabItemRenderer;
- dataGroup.addItemRenderer(ir);
-
- ir.index = dp.length - 1;
- ir.labelField = labelField;
- ir.tabIdField = tabsIdField;
+ fillRenderer(dp.length - 1, event.item, ir, presentationModel);
+
+ IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+ }
+
+ protected function fillRenderer(index:int,
+ item:Object,
+ itemRenderer:ISelectableItemRenderer,
+ presentationModel:IListPresentationModel):void
+ {
+ dataGroup.addItemRenderer(itemRenderer);
+
+ itemRenderer.index = index;
+ itemRenderer.labelField = labelField;
if (presentationModel) {
var style:SimpleCSSStyles = new SimpleCSSStyles();
style.marginBottom = presentationModel.separatorThickness;
- UIBase(ir).style = style;
- UIBase(ir).height = presentationModel.rowHeight;
- UIBase(ir).percentWidth = 100;
+ UIBase(itemRenderer).style = style;
+ UIBase(itemRenderer).height = presentationModel.rowHeight;
+ UIBase(itemRenderer).percentWidth = 100;
}
- ir.data = event.item;
-
- IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+ itemRenderer.data = item;
}
}
}
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as
index d0b1c23..436423d 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalFlexLayout.as
@@ -246,6 +246,7 @@
/**
*
* @flexjsignorecoercion org.apache.flex.core.ILayoutHost
+ * @flexjsignorecoercion org.apache.flex.core.UIBase
*
* @langversion 3.0
* @playerversion Flash 10.2
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/PanelLayoutProxy.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/PanelLayoutProxy.as
index 4ebc174..8189029 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/PanelLayoutProxy.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/PanelLayoutProxy.as
@@ -66,6 +66,7 @@
}
/**
+ * @flexjsignorecoercion org.apache.flex.html.Panel
* The width of the bounding box.
*
* @langversion 3.0
@@ -78,6 +79,7 @@
}
/**
+ * @flexjsignorecoercion org.apache.flex.html.Panel
* The height of the bounding box.
*
* @langversion 3.0
@@ -90,6 +92,7 @@
}
/**
+ * @flexjsignorecoercion org.apache.flex.html.Panel
* The number of elements in the parent.
*
* @langversion 3.0
@@ -103,6 +106,7 @@
}
/**
+ * @flexjsignorecoercion org.apache.flex.html.Panel
* Get a component from the parent.
*
* @param c The index of the subcomponent.
@@ -117,16 +121,39 @@
return (host as Panel).$getElementAt(index);
}
+ /**
+ * @flexjsignorecoercion org.apache.flex.html.Panel
+ */
COMPILE::JS
public function get somethingelse():WrappedHTMLElement
{
return (host as Panel).element;
}
+ /**
+ * @flexjsignorecoercion org.apache.flex.html.Panel
+ */
COMPILE::JS
public function get element():WrappedHTMLElement
{
return (host as Panel).element;
}
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.html.Panel
+ * The display style is used for both visible
+ * and layout so is managed as a special case.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ public function setDisplayStyleForLayout(value:String):void
+ {
+ (host as Panel).setDisplayStyleForLayout(value);
+ }
+
}
}
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index a07fc40..0ed5f4c 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -141,6 +141,7 @@
<component id="DataItemRendererFactoryForArrayData" class="org.apache.flex.html.beads.DataItemRendererFactoryForArrayData" />
<component id="DataItemRendererFactoryForArrayList" class="org.apache.flex.html.beads.DataItemRendererFactoryForArrayList" />
+ <component id="DynamicItemsRendererFactoryForArrayListData" class="org.apache.flex.html.beads.DynamicItemsRendererFactoryForArrayListData" />
<component id="DataItemRendererFactoryForHierarchicalData" class="org.apache.flex.html.beads.DataItemRendererFactoryForHierarchicalData" />
<component id="TextItemRendererFactoryForArrayData" class="org.apache.flex.html.beads.TextItemRendererFactoryForArrayData" />
<component id="TextItemRendererFactoryForStringVectorData" class="org.apache.flex.html.beads.TextItemRendererFactoryForStringVectorData" />
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
index d9ac1ac..00ffe9d 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
@@ -28,7 +28,7 @@
internal class MDLClasses
{
import org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayData; TabsItemRendererFactoryForArrayData;
- import org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayListData; TabsItemRendererFactoryForArrayListData;
+ import org.apache.flex.mdl.beads.TabsDynamicItemsRendererFactoryForArrayListData; TabsDynamicItemsRendererFactoryForArrayListData;
import org.apache.flex.mdl.beads.models.TabArrayModel; TabArrayModel;
import org.apache.flex.mdl.beads.models.TabArrayListModel; TabArrayListModel;
import org.apache.flex.mdl.beads.models.ToastModel; ToastModel;
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as
index 0b2c60a..1f08069 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Dialog.as
@@ -122,7 +122,7 @@
}
/**
- * show modal dialog
+ * Displays the dialog element and makes it the top-most modal dialog.
*
* @langversion 3.0
* @playerversion Flash 10.2
@@ -140,9 +140,10 @@
}
/**
- * show dialog.
+ * Displays the dialog element.
+ *
* Note: It seems MDL does not support non modal dialogs, since there's no examples
- * and dialogs are always added to "document.body" We could study change this.
+ * and dialogs are always added to "document.body".
*
* @langversion 3.0
* @playerversion Flash 10.2
@@ -160,7 +161,7 @@
}
/**
- * close dialog
+ * Closes the dialog element.
*
* @langversion 3.0
* @playerversion Flash 10.2
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
index 2513548..d4a7514 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
@@ -102,9 +102,6 @@
{
COMPILE::JS
{
- addTHeadToParent();
- addTBodyToParent();
-
if (_isTheadAddedToParent && _isTbodyAddedToParent)
{
tbody.addElement(c);
@@ -172,12 +169,12 @@
element = document.createElement('table') as WrappedHTMLElement;
- thead = new THead();
- tbody = new TBody();
-
positioner = element;
element.flexjs_wrapper = this;
+ addTHeadToParent();
+ addTBodyToParent();
+
return element;
}
@@ -242,11 +239,10 @@
{
if (_isTheadAddedToParent) return;
- if (thead)
- {
- super.addElement(thead);
- _isTheadAddedToParent = true;
- }
+ thead = new THead();
+ super.addElement(thead);
+
+ _isTheadAddedToParent = true;
}
COMPILE::JS
@@ -254,11 +250,9 @@
{
if (_isTbodyAddedToParent) return;
- if (tbody)
- {
- super.addElement(tbody);
- _isTbodyAddedToParent = true;
- }
+ tbody = new TBody();
+ super.addElement(tbody);
+ _isTbodyAddedToParent = true;
}
}
}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsDynamicItemsRendererFactoryForArrayListData.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsDynamicItemsRendererFactoryForArrayListData.as
new file mode 100644
index 0000000..371f79b
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TabsDynamicItemsRendererFactoryForArrayListData.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 org.apache.flex.mdl.beads
+{
+ import org.apache.flex.collections.IArrayList;
+ import org.apache.flex.core.IListPresentationModel;
+ import org.apache.flex.events.CollectionEvent;
+
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.beads.DynamicItemsRendererFactoryForArrayListData;
+ import org.apache.flex.mdl.beads.models.ITabModel;
+ import org.apache.flex.mdl.supportClasses.ITabItemRenderer;
+ import org.apache.flex.events.Event;
+
+ [Event(name="itemRendererCreated",type="org.apache.flex.events.ItemRendererEvent")]
+
+ /**
+ * The TabsDynamicItemsRendererFactoryForArrayListData class reads an
+ * array of data and creates an item renderer for every
+ * ITabItemRenderer in the array.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.8
+ */
+ public class TabsDynamicItemsRendererFactoryForArrayListData extends DynamicItemsRendererFactoryForArrayListData
+ {
+ public function TabsDynamicItemsRendererFactoryForArrayListData(target:Object = null)
+ {
+ super(target);
+ }
+
+ protected var tabsIdField:String;
+
+ /**
+ * finish setup
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.8
+ */
+ override protected function initComplete(event:Event):void
+ {
+ var model:ITabModel = _strand.getBeadByType(ITabModel) as ITabModel;
+ tabsIdField = model.tabIdField;
+
+ super.initComplete(event);
+ }
+
+ override protected function dataProviderChangeHandler(event:Event):void
+ {
+ var dp:IArrayList = dataProviderModel.dataProvider as IArrayList;
+ if (!dp)
+ return;
+
+ dataGroup.removeAllItemRenderers();
+
+ var presentationModel:IListPresentationModel = _strand.getBeadByType(IListPresentationModel) as IListPresentationModel;
+
+ var n:int = dp.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var ir:ITabItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITabItemRenderer;
+ ir.tabIdField = tabsIdField;
+
+ var item:Object = dp.getItemAt(i);
+ fillRenderer(i, item, ir, presentationModel);
+ }
+
+ IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+ }
+
+ override protected function itemAddedHandler(event:CollectionEvent):void
+ {
+ var dp:IArrayList = dataProviderModel.dataProvider as IArrayList;
+ if (!dp)
+ return;
+
+ var presentationModel:IListPresentationModel = _strand.getBeadByType(IListPresentationModel) as IListPresentationModel;
+
+ var ir:ITabItemRenderer = itemRendererFactory.createItemRenderer(dataGroup) as ITabItemRenderer;
+ ir.tabIdField = tabsIdField;
+
+ var index:int = dp.length - 1;
+ fillRenderer(index, event.item, ir, presentationModel);
+
+ IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
index ffe291a..34c09f2 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
@@ -26,7 +26,7 @@
import org.apache.flex.core.IStrand;
import org.apache.flex.mdl.TabBar;
import org.apache.flex.mdl.TabBarPanel;
- import org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayListData;
+ import org.apache.flex.mdl.beads.TabsDynamicItemsRendererFactoryForArrayListData;
import org.apache.flex.mdl.supportClasses.ITabItemRenderer;
/**
@@ -166,8 +166,8 @@
public function isTabsDynamic():Boolean
{
- var arrayListMapper:TabsItemRendererFactoryForArrayListData =
- _strand.getBeadByType(IDataProviderItemRendererMapper) as TabsItemRendererFactoryForArrayListData;
+ var arrayListMapper:TabsDynamicItemsRendererFactoryForArrayListData =
+ _strand.getBeadByType(IDataProviderItemRendererMapper) as TabsDynamicItemsRendererFactoryForArrayListData;
return arrayListMapper != null;
}
}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
index f8b3b05..9e5ece7 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
@@ -122,7 +122,7 @@
IBeadView: ClassReference("org.apache.flex.mdl.beads.views.TabsView");
IBeadModel: ClassReference("org.apache.flex.mdl.beads.models.TabArrayModel");
IBeadLayout: ClassReference(null);
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayListData");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsDynamicItemsRendererFactoryForArrayListData");
IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
IItemRenderer: ClassReference("org.apache.flex.mdl.itemRenderers.TabBarPanelItemRenderer");
}
@@ -132,7 +132,7 @@
IBeadView: ClassReference("org.apache.flex.mdl.beads.views.TabBarView");
IBeadModel: ClassReference("org.apache.flex.mdl.beads.models.TabArrayModel");
IBeadLayout: ClassReference(null);
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsItemRendererFactoryForArrayListData");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.mdl.beads.TabsDynamicItemsRendererFactoryForArrayListData");
IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
IItemRenderer: ClassReference("org.apache.flex.mdl.itemRenderers.TabBarButtonTabsItemRenderer");
}
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as
index 1b35305..e1358a4 100644
--- a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ContentElement.as
@@ -44,10 +44,18 @@
/**
* The parent
*/
- public function get groupElement() : GroupElement
+ private var _groupElement:GroupElement;
+ public function get groupElement():GroupElement
{
+ if(_groupElement)
+ return _groupElement.getElementIndex(this) < 0 ? null : _groupElement;
return null;
}
+ public function set groupElement(value:GroupElement):void
+ {
+ _groupElement = value;
+ }
+
public function get rawText() : String
{
return null;
@@ -56,13 +64,22 @@
{
return null;
}
- public function get textBlock() : ITextBlock
+
+ private var _textBlock:ITextBlock;
+ public function get textBlock():ITextBlock
{
- return null;
+ if(groupElement)
+ return groupElement.textBlock;
+ return _textBlock;
}
+ public function set textBlock(value:ITextBlock):void
+ {
+ _textBlock = value;
+ }
+
public function get textBlockBeginIndex() : int
{
- return null;
+ return textBlock ? textBlock.getRelativeStart(this) : 0;
}
public var textRotation : String
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as
index a61c97f..7d5d928 100644
--- a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/GroupElement.as
@@ -20,6 +20,7 @@
{
import org.apache.flex.events.EventDispatcher;
import org.apache.flex.text.engine.TextElement;
+ import org.apache.flex.text.engine.GroupElement;
public class GroupElement extends ContentElement
{
@@ -27,7 +28,10 @@
{
super(elementFormat, eventMirror, textRotation);
if(elements)
+ {
_elements = elements;
+ setElementsGroup(this);
+ }
else
_elements = new Vector.<ContentElement>();
}
@@ -67,6 +71,7 @@
}
public function replaceElements(beginIndex:int, endIndex:int, newElements:Vector.<ContentElement>):Vector.<ContentElement>
{
+ setElementsGroup(null);
COMPILE::SWF
{
var args:Array = [beginIndex, endIndex-beginIndex];
@@ -79,15 +84,25 @@
}
COMPILE::JS
{
- var args:Array = [beginIndex, endIndex-beginIndex].concat(newElements);
+ var args:Array = [beginIndex, endIndex-beginIndex];
+ // don't concat null
+ if(newElements)
+ args = args.concat(newElements);
// _elements.splice(beginIndex,endIndex-beginIndex);
}
- _elements.splice.apply(_elements, args);
+ _elements.splice.apply(_elements, args);
+ setElementsGroup(this);
return _elements;
}
public function setElements(value:Vector.<ContentElement>):void
{
_elements = value;
+ setElementsGroup(this);
+ }
+ private function setElementsGroup(group:GroupElement):void
+ {
+ for(var i:int=0; i<_elements.length; i++)
+ _elements[i].groupElement = group;
}
public function splitTextElement(elementIndex:int, splitIndex:int):TextElement
{
@@ -101,7 +116,9 @@
var nextText:String = textElem.rawText.substr(splitIndex);
var newElem:TextElement = new TextElement(nextText,textElem.elementFormat,textElem.eventMirror,textElem.textRotation);
textElem.text = firstText;
+ newElem.groupElement = this;
_elements.splice(elementIndex+1,0,newElem);
+
return newElem;
}
public function ungroupElements(groupIndex:int):void
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as
index 7f9be7c..8d51b90 100644
--- a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/engine/ITextBlock.as
@@ -19,6 +19,7 @@
package org.apache.flex.text.engine
{
import org.apache.flex.text.engine.ITextFactory;
+ import org.apache.flex.text.engine.ContentElement;
public interface ITextBlock
{
@@ -64,5 +65,7 @@
function releaseLineCreationData():void;
function releaseLines(firstLine:ITextLine, lastLine:ITextLine):void;
+ function getRelativeStart(element:ContentElement):int;
+
}
}
\ No newline at end of file
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as
index cb9cd5d..45f461a 100644
--- a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextBlock.as
@@ -279,6 +279,10 @@
{
lines.length = 0;
}
+ public function getRelativeStart(element:ContentElement):int
+ {
+ return 0;
+ }
}
}
\ No newline at end of file
diff --git a/frameworks/projects/XML/src/main/flex/XML.as b/frameworks/projects/XML/src/main/flex/XML.as
index 7970df1..7e749fc 100644
--- a/frameworks/projects/XML/src/main/flex/XML.as
+++ b/frameworks/projects/XML/src/main/flex/XML.as
@@ -1808,7 +1808,7 @@
return false;
}
- public function setAttribute(attr:*,value:String):void
+ public function setAttribute(attr:*,value:String):String
{
var i:int;
if(!_attributes)
@@ -1823,7 +1823,7 @@
if(_attributes[i].name().equals(attr.name()))
{
_attributes[i].setValue(value);
- return;
+ return value;
}
//addChild(_att)
}
@@ -1831,7 +1831,7 @@
attr.setValue(value);
addChild(attr);
}
- return;
+ return value;
}
if(attr.indexOf("xmlns") == 0)
@@ -1857,13 +1857,13 @@
if(_attributes[i].name().equals(attrXML.name()))
{
_attributes[i].setValue(value);
- return;
+ return value;
}
//addChild(_att)
}
addChild(attrXML);
}
-
+ return value;
}
/**
* Replaces the child properties of the XML object with the specified name with the specified XML or XMLList.
@@ -1873,7 +1873,7 @@
* @return
*
*/
- public function setChild(elementName:*, elements:Object):void
+ public function setChild(elementName:*, elements:Object):Object
{
/*
@@ -1943,6 +1943,16 @@
var i:int;
var len:int;
var chld:XML;
+ var retVal:Object = elements;
+
+ // I'm not wure that this a strict interpretation of the spec but I think this does the "right thing".
+ var childType:String = typeof elements;
+ if(childType != "object")
+ {
+ var stringable:XML = xmlFromStringable(elements);
+ elements = new XML("<" + elementName + "/>");
+ elements.appendChild(stringable);
+ }
if(elements is XML)
{
@@ -1987,6 +1997,7 @@
}
//what to do if it's not XML or XMLList? Throw an error? Ignore?
+ return retVal;
}
/**
@@ -2120,6 +2131,16 @@
{
_value = value;
}
+
+ /**
+ * @private
+ *
+ * Allows XMLList to get the targetObject of its targetObject and not error when it gets the XML
+ */
+ public function get targetObject():*
+ {
+ return null;
+ }
/**
* Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index d90ee3d..6f8dcdd 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -230,6 +230,7 @@
public function child(propertyName:Object):XMLList
{
var retVal:XMLList = new XMLList();
+ retVal.targetProperty = propertyName.toString();
var propNum:Number = parseInt(propertyName,10);
if(propNum.toString() == propertyName)
{
@@ -240,9 +241,12 @@
}
return retVal;
}
+ if(isEmpty())
+ {
+ retVal.targetObject = this;
+ }
if(isSingle())
return _xmlArray[0].child(propertyName);
-
var len:int = _xmlArray.length;
for (var i:int=0;i<len;i++)
{
@@ -783,12 +787,25 @@
{
return _targetProperty;
}
-
- public function setAttribute(attr:*,value:String):void
+ private function xmlFromProperty():XML
{
+ var xmlStr:String = "<";
+ if(_targetProperty.prefix)
+ xmlStr += _targetProperty.prefix + "::";
+
+ xmlStr += _targetProperty.localName + "/>";
+ return new XML(xmlStr);
+ }
+ public function setAttribute(attr:*,value:String):String
+ {
+ if(isEmpty() && targetObject)//walk up the tree and create nodes.
+ _xmlArray[0] = targetObject.setChild(_targetProperty,xmlFromProperty());
+
var len:int = _xmlArray.length;
for (var i:int=0;i<len;i++)
_xmlArray[i].setAttribute(attr,value);
+
+ return value;
}
public function hasAncestor(obj:*):Boolean
@@ -840,11 +857,15 @@
if(isSingle())
return _xmlArray[0].replace(propertyName,value);
}
- public function setChild(elementName:*, elements:Object):void
+ public function setChild(elementName:*, elements:Object):Object
{
+ if(isEmpty() && targetObject)//walk up the tree and create nodes.
+ _xmlArray[0] = targetObject.setChild(_targetProperty,xmlFromProperty());
+
if(isSingle())
_xmlArray[0].setChild(elementName,elements);
-
+
+ return elements;
}
public function setParent(parent:XML):void
diff --git a/manualtests/BubbleTest/build.xml b/manualtests/BubbleTest/build.xml
index 6cea9d2..8b013cf 100644
--- a/manualtests/BubbleTest/build.xml
+++ b/manualtests/BubbleTest/build.xml
@@ -22,52 +22,26 @@
<project name="bubbletest" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="BubbleTest" />
- <property name="swf.version" value="11" />
-
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
<!-- use this to add keep metadata option -->
<property name="theme_arg" value="-keep-as3-metadata+=Event" />
- <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"/>
+
+ <property file="${FLEXJS_HOME}/env.properties"/>
+ <property environment="env"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
+ <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
<include file="${basedir}/../build_example.xml" />
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/ContainerTest/build.xml b/manualtests/ContainerTest/build.xml
index c39c049..6ab2b67 100644
--- a/manualtests/ContainerTest/build.xml
+++ b/manualtests/ContainerTest/build.xml
@@ -22,52 +22,24 @@
<project name="containertest" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="ContainerTest" />
- <property name="swf.version" value="11" />
+
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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" />
-
-<!-- temp remove build_example.compilejs -->
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
diff --git a/manualtests/CursorTest/build.xml b/manualtests/CursorTest/build.xml
index c0f971f..3c61362 100644
--- a/manualtests/CursorTest/build.xml
+++ b/manualtests/CursorTest/build.xml
@@ -22,52 +22,26 @@
<project name="cursortest" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="CursorTest" />
- <property name="swf.version" value="11" />
-
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <!-- use this to add keep metadata option -->
+
+ <!-- use this to add keep metadata option -->
<property name="theme_arg" value="-keep-as3-metadata+=Event" />
- <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"/>
+
+ <property file="${FLEXJS_HOME}/env.properties"/>
+ <property environment="env"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
+ <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
<include file="${basedir}/../build_example.xml" />
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/DataBindingTestbed/build.xml b/manualtests/DataBindingTestbed/build.xml
index 9c4ed2d..5fc23e6 100644
--- a/manualtests/DataBindingTestbed/build.xml
+++ b/manualtests/DataBindingTestbed/build.xml
@@ -22,53 +22,24 @@
<project name="databindingexample" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="DataBindingTestbed" />
- <property name="swf.version" value="11" />
-
+
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<delete dir="${basedir}/bin" failonerror="false" />
<delete dir="${basedir}/bin-debug" failonerror="false" />
<delete dir="${basedir}/bin-release" failonerror="false" />
- </target>
-
+ <delete dir="${basedir}/target" failonerror="false" />
+ </target>
diff --git a/manualtests/DataGridXcompile/build.xml b/manualtests/DataGridXcompile/build.xml
index ccc86f8..a8c716c 100644
--- a/manualtests/DataGridXcompile/build.xml
+++ b/manualtests/DataGridXcompile/build.xml
@@ -23,49 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="DataGridXcompile" />
- <property file="${FLEXJS_HOME}/env.properties"/>
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<delete dir="${basedir}/bin" failonerror="false" />
<delete dir="${basedir}/bin-debug" failonerror="false" />
<delete dir="${basedir}/bin-release" failonerror="false" />
- </target>
+ <delete dir="${basedir}/target" failonerror="false" />
+ </target>
</project>
diff --git a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/DataGridView.as b/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/DataGridView.as
index 15fe694..ba189d2 100644
--- a/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/DataGridView.as
+++ b/manualtests/DataGridXcompile/src/org/apache/flex/html/customControls/beads/DataGridView.as
@@ -26,6 +26,7 @@
import org.apache.flex.core.IDataGridModel;
import org.apache.flex.core.IDataGridPresentationModel;
import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
import org.apache.flex.core.UIBase;
import org.apache.flex.core.ValuesManager;
import org.apache.flex.events.Event;
@@ -145,5 +146,12 @@
IEventDispatcher(_strand).dispatchEvent(new Event('change'));
}
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.IUIBase
+ */
+ public function get host():IUIBase
+ {
+ return _strand as IUIBase;
+ }
}
}
diff --git a/manualtests/DataGridXcompile/src/org/apache/flex/html/staticControls/beads/BoxGridView.as b/manualtests/DataGridXcompile/src/org/apache/flex/html/staticControls/beads/BoxGridView.as
index a9d7b8f..7a75394 100644
--- a/manualtests/DataGridXcompile/src/org/apache/flex/html/staticControls/beads/BoxGridView.as
+++ b/manualtests/DataGridXcompile/src/org/apache/flex/html/staticControls/beads/BoxGridView.as
@@ -16,10 +16,11 @@
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads
+package org.apache.flex.html.staticControls.beads
{
import org.apache.flex.core.IBeadView;
import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
import org.apache.flex.core.UIBase;
import org.apache.flex.html.Label;
@@ -44,5 +45,12 @@
label.height = 25;
UIBase(_strand).addElement(label);
}
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.IUIBase
+ */
+ public function get host():IUIBase
+ {
+ return _strand as IUIBase;
+ }
}
}
diff --git a/manualtests/DateChooserExample/build.xml b/manualtests/DateChooserExample/build.xml
index c4e09af..84ab9b3 100644
--- a/manualtests/DateChooserExample/build.xml
+++ b/manualtests/DateChooserExample/build.xml
@@ -25,49 +25,21 @@
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
-
</project>
diff --git a/manualtests/EffectsExample/build.xml b/manualtests/EffectsExample/build.xml
index de6a574..b16f1ac 100644
--- a/manualtests/EffectsExample/build.xml
+++ b/manualtests/EffectsExample/build.xml
@@ -25,53 +25,20 @@
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
- <!-- Uncomment to reproduce cross-compilation error in compilejs step
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
- </target>
- -->
<target name="clean">
<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>
-
-
</project>
diff --git a/manualtests/EffectsExample/src/MyInitialView.mxml b/manualtests/EffectsExample/src/MyInitialView.mxml
index 74cfafb..19fefe8 100644
--- a/manualtests/EffectsExample/src/MyInitialView.mxml
+++ b/manualtests/EffectsExample/src/MyInitialView.mxml
@@ -28,6 +28,10 @@
font-size: 14pt;
font-weight: bold;
}
+
+ global {
+ IEffectTimer: ClassReference("org.apache.flex.utils.EffectTimer");
+ }
</fx:Style>
@@ -78,10 +82,10 @@
<js:TextButton text="fade in" click="fadein()" />
</js:Container>
- <js:Container width="500">
- <js:Image id="image1" source="twong.jpg" x="100" y="20" />
+ <js:Container width="500" height="500">
+ <js:Image id="image1" src="twong.jpg" x="100" y="20" />
<js:Label id="caption1" text="Dick" x="100" y="200" />
- <js:Image id="image2" source="jproctor.jpg" x="400" y="20" />
+ <js:Image id="image2" src="jproctor.jpg" x="400" y="20" />
<js:Label id="caption2" text="Jane" x="400" y="200" />
</js:Container>
</js:Container>
diff --git a/manualtests/FlexJSTest_HTML5/build.xml b/manualtests/FlexJSTest_HTML5/build.xml
index 4faedac..0253696 100644
--- a/manualtests/FlexJSTest_HTML5/build.xml
+++ b/manualtests/FlexJSTest_HTML5/build.xml
@@ -23,48 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="FlexJSTest_HTML5" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/FlexJSTest_Panel/build.xml b/manualtests/FlexJSTest_Panel/build.xml
index 267a21d..23e3886 100644
--- a/manualtests/FlexJSTest_Panel/build.xml
+++ b/manualtests/FlexJSTest_Panel/build.xml
@@ -25,47 +25,20 @@
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/FlexJSTest_SVG/build.xml b/manualtests/FlexJSTest_SVG/build.xml
index b273902..b714ff5 100644
--- a/manualtests/FlexJSTest_SVG/build.xml
+++ b/manualtests/FlexJSTest_SVG/build.xml
@@ -23,49 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="FlexJSTest_SVG" />
- <property file="${FLEXJS_HOME}/env.properties"/>
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/FlexJSTest_SVG/src/SkinsView.mxml b/manualtests/FlexJSTest_SVG/src/SkinsView.mxml
index e1a95d3..e0a6f65 100644
--- a/manualtests/FlexJSTest_SVG/src/SkinsView.mxml
+++ b/manualtests/FlexJSTest_SVG/src/SkinsView.mxml
@@ -18,7 +18,10 @@
-->
<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:js="library://ns.apache.org/flexjs/basic" xmlns:skins="skins.*" xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:js="library://ns.apache.org/flexjs/basic"
+ xmlns:svg="org.apache.flex.svg.*"
+ xmlns:graphics="org.apache.flex.graphics.*"
+ xmlns:skins="skins.*" xmlns:mx="library://ns.adobe.com/flex/mx"
initComplete="viewbase1_initCompleteHandler(event)">
<fx:Script>
<![CDATA[
@@ -71,35 +74,35 @@
<!--<js:beads>
<js:ViewDataBinding />
</js:beads>-->
- <js:Container x="0" y="0" >
- <js:Label text="MyButton" x="20" y="10" includeIn="{[up,down,over,disabled]}" selectable="true"/>
+ <js:Container x="0" y="0" width="500" height="500">
+ <js:Label text="MyButton" x="20" y="10" includeIn="{[up,down,over,disabled]}" />
- <js:Rect id="fill_up" width="100" height="30" includeIn="up" >
- <js:stroke>
- <js:SolidColorStroke alpha="1.0" color="#000000" />
- </js:stroke>
- <js:fill>
- <js:SolidColor color="#1ABC9C" alpha="1.0" />
- </js:fill>
- </js:Rect>
+ <svg:Rect id="fill_up" width="100" height="30" includeIn="up" >
+ <svg:stroke>
+ <graphics:SolidColorStroke alpha="1.0" color="#000000" />
+ </svg:stroke>
+ <svg:fill>
+ <graphics:SolidColor color="#1ABC9C" alpha="1.0" />
+ </svg:fill>
+ </svg:Rect>
- <js:Rect id="fill_over" width="100" height="30" includeIn="over">
- <js:stroke>
- <js:SolidColorStroke alpha="1.0" color="#000000" lineDash="{dashArray}" weight="5" lineJoin="round"/>
- </js:stroke>
- <js:fill>
- <js:SolidColor color="#48C9B0" alpha="1.0" />
- </js:fill>
- </js:Rect>
+ <svg:Rect id="fill_over" width="100" height="30" includeIn="over">
+ <svg:stroke>
+ <graphics:SolidColorStroke alpha="1.0" color="#000000" lineDash="{dashArray}" weight="5" lineJoin="round"/>
+ </svg:stroke>
+ <svg:fill>
+ <graphics:SolidColor color="#48C9B0" alpha="1.0" />
+ </svg:fill>
+ </svg:Rect>
- <js:Rect id="fill_down" width="100" height="30" includeIn="down">
- <js:stroke>
- <js:SolidColorStroke alpha="1.0" color="#000000" />
- </js:stroke>
- <js:fill>
- <js:SolidColor color="#16A085" alpha="1.0" />
- </js:fill>
- </js:Rect>
+ <svg:Rect id="fill_down" width="100" height="30" includeIn="down">
+ <svg:stroke>
+ <graphics:SolidColorStroke alpha="1.0" color="#000000" />
+ </svg:stroke>
+ <svg:fill>
+ <graphics:SolidColor color="#16A085" alpha="1.0" />
+ </svg:fill>
+ </svg:Rect>
<js:TextButton x="50" y="100" text="Just a button"/>
</js:Container>
diff --git a/manualtests/FlexJSTest_basic/build.xml b/manualtests/FlexJSTest_basic/build.xml
index 313fe90..d39eeb0 100644
--- a/manualtests/FlexJSTest_basic/build.xml
+++ b/manualtests/FlexJSTest_basic/build.xml
@@ -23,48 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="FlexJSTest_basic" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/FlexJSTest_createjs/build.xml b/manualtests/FlexJSTest_createjs/build.xml
index b8cda4e..2a3018e 100644
--- a/manualtests/FlexJSTest_createjs/build.xml
+++ b/manualtests/FlexJSTest_createjs/build.xml
@@ -22,51 +22,24 @@
<project name="flexjstest_createjs" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="CreateJSExample" />
+
+ <property name="extlib_arg" value="-js-external-library-path+=../../js/libs/createjs.swc"/>
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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"/>
-
- <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/createjs/target/createjs.swc"/>
+
<include file="${basedir}/../build_example.xml" />
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
-
</project>
diff --git a/manualtests/FlexJSTest_jquery/build.xml b/manualtests/FlexJSTest_jquery/build.xml
index d408541..ca1f272 100644
--- a/manualtests/FlexJSTest_jquery/build.xml
+++ b/manualtests/FlexJSTest_jquery/build.xml
@@ -23,48 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="jQuerySample" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
-
+
</project>
diff --git a/manualtests/FormExample/build.xml b/manualtests/FormExample/build.xml
index 9e18f17..d482901 100644
--- a/manualtests/FormExample/build.xml
+++ b/manualtests/FormExample/build.xml
@@ -23,55 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="FormExample" />
- <property file="${FLEXJS_HOME}/env.properties"/>
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
- <!-- Uncomment to reproduce cross-compilation error in compilejs step
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
- </target>
- -->
<target name="clean">
<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>
-
-
</project>
diff --git a/manualtests/FormExample/src/MyFormView.mxml b/manualtests/FormExample/src/MyFormView.mxml
index 190fbe5..6e85f22 100644
--- a/manualtests/FormExample/src/MyFormView.mxml
+++ b/manualtests/FormExample/src/MyFormView.mxml
@@ -47,7 +47,7 @@
<js:Label text="Loan Form" className="title" />
- <js:Container width="500">
+ <js:Container width="500" height="600" >
<js:beads>
<js:VerticalColumnLayout numColumns="2" />
</js:beads>
diff --git a/manualtests/FormatExample/build.xml b/manualtests/FormatExample/build.xml
index 00c6a9e..c3c7b08 100644
--- a/manualtests/FormatExample/build.xml
+++ b/manualtests/FormatExample/build.xml
@@ -23,55 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="FormatExample" />
- <property file="${FLEXJS_HOME}/env.properties"/>
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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" description="Clean build of ${example}">
</target>
- <!-- Uncomment to reproduce cross-compilation error in compilejs step
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
- </target>
- -->
<target name="clean">
<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>
-
-
</project>
diff --git a/manualtests/FormatExample/src/MyFormView.mxml b/manualtests/FormatExample/src/MyFormView.mxml
index d513fcb..f31ca97 100644
--- a/manualtests/FormatExample/src/MyFormView.mxml
+++ b/manualtests/FormatExample/src/MyFormView.mxml
@@ -21,7 +21,7 @@
xmlns:js="library://ns.apache.org/flexjs/basic"
xmlns:local="*"
xmlns:models="models.*"
- xmlns:acc="org.apache.flex.html.accessories.*">
+ xmlns:acc="org.apache.flex.html.staticControls.accessories.*">
<fx:Style>
.title {
diff --git a/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as b/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as
index 0d1b613..58ffad1 100644
--- a/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as
+++ b/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/NumberFormatter.as
@@ -16,7 +16,7 @@
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.accessories
+package org.apache.flex.html.staticControls.accessories
{
import org.apache.flex.core.IBeadModel;
import org.apache.flex.core.IFormatBead;
diff --git a/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as b/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as
index 7523c96..4231bce 100644
--- a/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as
+++ b/manualtests/FormatExample/src/org/apache/flex/html/staticControls/accessories/PhoneNumberFormatter.as
@@ -16,7 +16,7 @@
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.accessories
+package org.apache.flex.html.staticControls.accessories
{
import org.apache.flex.core.IBead;
import org.apache.flex.core.IBeadModel;
diff --git a/manualtests/GenericTests/build.xml b/manualtests/GenericTests/build.xml
deleted file mode 100644
index 7213c68..0000000
--- a/manualtests/GenericTests/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.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.
-
--->
-
-
-<project name="GenericTests" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="../.."/>
- <property name="example" value="GenericTests" />
- <property name="swf.version" value="11" />
-
- <!-- adding flexuint style meta collection, and additional testing meta tags (Event,Bindable,TestMeta)-->
- <property name="theme_arg" value="-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta" />
- <!-- adding flexuint style meta collection, and additional testing meta tags (Event,Bindable,TestMeta)-->
- <property name="extlib_arg" value="-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta" />
- <property file="${FLEXJS_HOME}/env.properties"/>
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 GenericTests">
- </target>
-
- <target name="clean">
- <delete dir="${basedir}/bin" failonerror="false" />
- <delete dir="${basedir}/bin-debug" failonerror="false" />
- <delete dir="${basedir}/bin-release" failonerror="false" />
- </target>
-
-</project>
diff --git a/manualtests/ImageTest/build.xml b/manualtests/ImageTest/build.xml
index 5b5fbfa..16bad87 100644
--- a/manualtests/ImageTest/build.xml
+++ b/manualtests/ImageTest/build.xml
@@ -23,48 +23,21 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="ImageTest" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
-
</project>
diff --git a/manualtests/ImageTest/src/MyInitialView.mxml b/manualtests/ImageTest/src/MyInitialView.mxml
index 8037448..0ed949a 100644
--- a/manualtests/ImageTest/src/MyInitialView.mxml
+++ b/manualtests/ImageTest/src/MyInitialView.mxml
@@ -35,10 +35,10 @@
<js:VerticalLayout />
</js:beads>
- <js:Image width="48" height="48" source="smallbluerect.jpg" />
- <js:Image width="183" height="178" source="largegreenrect.png" />
- <js:Image width="48" height="48" source="smallorangerect.gif" />
- <js:Image width="48" height="48" source="smallgreenrect.jpg" />
+ <js:Image width="48" height="48" src="smallbluerect.jpg" />
+ <js:Image width="183" height="178" src="largegreenrect.png" />
+ <js:Image width="48" height="48" src="smallorangerect.gif" />
+ <js:Image width="48" height="48" src="smallgreenrect.jpg" />
</js:Container>
diff --git a/manualtests/LanguageTests/build.xml b/manualtests/LanguageTests/build.xml
index 6de5e8a..0e986cb 100644
--- a/manualtests/LanguageTests/build.xml
+++ b/manualtests/LanguageTests/build.xml
@@ -22,50 +22,25 @@
<project name="languagetests" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="LanguageTests" />
+
+ <property name="file_suffix" value="as" />
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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.compileas,build_example.compileasjs" description="Clean build of ${example}">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/ListsTest/build.xml b/manualtests/ListsTest/build.xml
index e6d7c8b..4acc6da 100644
--- a/manualtests/ListsTest/build.xml
+++ b/manualtests/ListsTest/build.xml
@@ -25,47 +25,20 @@
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/ListsTest/src/products/ProductItemRenderer.as b/manualtests/ListsTest/src/products/ProductItemRenderer.as
index 2983149..6e3d74a 100644
--- a/manualtests/ListsTest/src/products/ProductItemRenderer.as
+++ b/manualtests/ListsTest/src/products/ProductItemRenderer.as
@@ -57,7 +57,7 @@
{
super.data = value;
- image.url = data.image;
+ image.src = data.image;
title.text = data.title;
detail.text = data.detail;
}
diff --git a/manualtests/ProxyTest/build.xml b/manualtests/ProxyTest/build.xml
index 2e1bcb7..83084b6 100644
--- a/manualtests/ProxyTest/build.xml
+++ b/manualtests/ProxyTest/build.xml
@@ -23,50 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="ProxyTest" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <!-- use this to add keep metadata option -->
- <property name="theme_arg" value="-keep-as3-metadata+=Event" />
- <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 FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/ReflectionTest/build.xml b/manualtests/ReflectionTest/build.xml
index d65e7a8..b9bfd2c 100644
--- a/manualtests/ReflectionTest/build.xml
+++ b/manualtests/ReflectionTest/build.xml
@@ -23,50 +23,22 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="ReflectionTest" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <!-- use this to add keep metadata option -->
- <property name="theme_arg" value="-keep-as3-metadata+=Event" />
- <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 FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/RollEventsTest/build.xml b/manualtests/RollEventsTest/build.xml
index 767c856..3dedfed 100644
--- a/manualtests/RollEventsTest/build.xml
+++ b/manualtests/RollEventsTest/build.xml
@@ -23,48 +23,23 @@
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="RollEventsTest" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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 FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
+
</project>
diff --git a/manualtests/TLFEditTestFlexJS/build.xml b/manualtests/TLFEditTestFlexJS/build.xml
index fc35c60..f1abc29 100644
--- a/manualtests/TLFEditTestFlexJS/build.xml
+++ b/manualtests/TLFEditTestFlexJS/build.xml
@@ -22,51 +22,26 @@
<project name="TLFEditTestFlexJS" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="TLFEditTestFlexJS" />
+
<property name="swf.version" value="20" />
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <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"/>
+ <property name="optional_arg" value="-remove-circulars" />
+
<include file="${basedir}/../build_example.xml" />
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/UnitTests/README.txt b/manualtests/UnitTests/README.txt
new file mode 100644
index 0000000..98c2bae
--- /dev/null
+++ b/manualtests/UnitTests/README.txt
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+DESCRIPTION
+
+The UnitTests application is a very basic form of unit testing primarily
+intended for FlexJS framework developers. It is a 'lite' version of a small portion of
+Flexunit code to support basic assertion tests.
+
+This Flex application may be run as a Flash SWF or cross-compiled (using Falcon JX)
+into JavaScript and HTML and run without Flash.
+
+There is a convenience html page inside the top level testsview directory for hosting the tests side-by-side
+that permits developers to refresh the test builds simultaneously and compare results in the browser, including the
+ability to toggle between JS-Debug and JS-Release builds.
+While this is primarily intended for framework developers, it may be useful as a starting point
+for cross-compiled unit testing (during development only) in regular FlexJS projects.
+
+FRAMEWORK DEVELOPER NOTES
+To add new tests, follow the examples inside the flexUnitTests package, and add any new Test
+group or category level class (the classes directly inside flexUnitTests package) into the top
+level TestClasses.as file. This should be all that is necessary to add new tests.
+
+MetaData
+[BeforeClass] -same as flexunit (typical: 'setupBeforClass')- runs a static method before the test class is instantiated
+[AfterClass] -same as flexunit (typical: 'tearDownAfterClass')- runs a static method after the test class has been processed
+[Before] -same as flexunit (typical: 'setup') - runs an instance method before the test class' test methods are processed
+[After] -same as flexunit (typical: 'tearDown') - runs an instance method after the test class' test methods are processed
+[Test] -same as flexunit (typical: 'testXXXX') - denotes a test method. No assumption about order of test methods being called should be made
+
+[TestVariance(variance="JS",description="Reason for variation in JS expected results")]
+The above is specific to this test app, and permits annotation of test methods where the expected results are different between compiler targets.
+The variance key in the meta data should be either "SWF" or "JS". This is the compiler target with the result that is considered to be different
+to what it ideally 'should be', but correct as per the current implementation of the framework. Usually this will be "JS". It indicates a known
+but currently acceptable difference between compiler targets.
+
+
+GENERAL NOTES
+
+In its first working version this app only supports synchronous simple assertions and
+is intended to use test classes that are compatible with the flexunit tests that are
+used in the full framework build. Future versions may include more advanced features.
+
+The cross-compilation to JavaScript often results in non-fatal warnings. Some of these warnings
+should be addressed in future releases of the Falcon JX compiler.
diff --git a/manualtests/UnitTests/build.xml b/manualtests/UnitTests/build.xml
new file mode 100644
index 0000000..68d82b3
--- /dev/null
+++ b/manualtests/UnitTests/build.xml
@@ -0,0 +1,58 @@
+<?xml version="1.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.
+
+-->
+
+
+<project name="GenericTests" default="main" basedir=".">
+ <property name="FLEXJS_HOME" location="../.."/>
+ <property name="example" value="UnitTests" />
+
+ <!-- adding flexuint style meta collection, and additional testing meta tags (Event,Bindable,TestMeta)-->
+ <property name="theme_arg" value="-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta" />
+ <!-- adding flexuint style meta collection, and additional testing meta tags (Event,Bindable,TestMeta)-->
+ <property name="extlib_arg" value="-keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta" />
+
+ <property file="${FLEXJS_HOME}/env.properties"/>
+ <property environment="env"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
+ <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+
+ <!-- make ant src and output consistent with maven -->
+ <property name="maven_compat" value="true"/>
+
+ <include file="${basedir}/../build_example.xml" />
+
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+ </target>
+
+ <target name="clean">
+ <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 name="examine" depends="build_example.get.browser">
+ <echo message="View the swf and js unit tests side-by-side"/>
+ <exec executable="${browser}" dir="${basedir}" failonerror="true">
+ <arg value="file:///${basedir}/testsview/index.html"/>
+ </exec>
+ </target>
+
+</project>
diff --git a/manualtests/UnitTests/pom.xml b/manualtests/UnitTests/pom.xml
new file mode 100644
index 0000000..315291b
--- /dev/null
+++ b/manualtests/UnitTests/pom.xml
@@ -0,0 +1,172 @@
+<?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.manualtests</groupId>
+ <artifactId>manualtests</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>UnitTests</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>swf</packaging>
+ <name>Apache Flex - FlexJS: ManualTests: UnitTests</name>
+
+ <properties>
+ <title>${project.artifactId}</title>
+ <bgcolor>#ffffff</bgcolor>
+ <useBrowserHistory>--</useBrowserHistory>
+ <version_major>11</version_major>
+ <version_minor>1</version_minor>
+ <version_revision>0</version_revision>
+ <expressInstallSwf>expressInstall.swf</expressInstallSwf>
+ <application>${project.artifactId}</application>
+ <swf>${project.artifactId}</swf>
+ <width>100%</width>
+ <height>100%</height>
+ </properties>
+
+ <build>
+ <defaultGoal>compile</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>flexjs-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <targets>SWF</targets>
+ <mainClass>${project.artifactId}.mxml</mainClass>
+ <debug>true</debug>
+ <additionalCompilerOptions>-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta -keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta</additionalCompilerOptions>
+ <outputDirectory>${basedir}/target/bin-debug</outputDirectory>
+ <flashOutputFileName>${project.artifactId}.swf</flashOutputFileName>
+ </configuration>
+ <executions>
+ <execution>
+ <id>compile-js</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>compile-app</goal>
+ </goals>
+ <configuration>
+ <targets>JSFlex</targets>
+ <mainClass>${project.artifactId}.mxml</mainClass>
+ <debug>false</debug>
+ <additionalCompilerOptions>-keep-as3-metadata+=Test,BeforeClass,AfterClass,Before,After,TestVariance,Event,Bindable,TestMeta -keep-code-with-metadata=Test,BeforeClass,AfterClass,Before,After,TestVariance,TestMeta</additionalCompilerOptions>
+ <outputDirectory>${basedir}/target</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>copy-template-swf</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target/bin-debug</outputDirectory>
+ <includeEmptyDirs>true</includeEmptyDirs>
+ <resources>
+ <resource>
+ <directory>${FLEXJS_HOME}/templates/swfobject</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.coderplus.maven.plugins</groupId>
+ <artifactId>copy-rename-maven-plugin</artifactId>
+ <version>1.0.1</version>
+ <executions>
+ <execution>
+ <id>rename-file</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>rename</goal>
+ </goals>
+ <configuration>
+ <sourceFile>${basedir}/target/bin-debug/index.template.html</sourceFile>
+ <destinationFile>${basedir}/target/bin-debug/${project.artifactId}.html</destinationFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ <!--<plugin>
+ <groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>replacer</artifactId>
+ <version>1.5.2</version>
+ <executions>
+ <execution>
+ <id>configure-swf-template</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ <configuration>
+ <file>${basedir}/bin-debug/index.template.html</file>
+ <regex>false</regex>
+ <replacements>
+
+ </replacements>
+ </configuration>
+ </execution>
+ </executions>
+ </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>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Reflection</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Reflection</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/manualtests/GenericTests/src/README.txt b/manualtests/UnitTests/src/README.txt
similarity index 100%
rename from manualtests/GenericTests/src/README.txt
rename to manualtests/UnitTests/src/README.txt
diff --git a/manualtests/UnitTests/src/main/config/compile-app-config.xml b/manualtests/UnitTests/src/main/config/compile-app-config.xml
new file mode 100644
index 0000000..00454bd
--- /dev/null
+++ b/manualtests/UnitTests/src/main/config/compile-app-config.xml
@@ -0,0 +1,25 @@
+<!--
+
+ 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.
+
+-->
+<flex-config>
+ <js-output-optimization>
+ <optimization>skipFunctionCoercions</optimization>
+ </js-output-optimization>
+ <compiler>
+ </compiler>
+</flex-config>
diff --git a/manualtests/GenericTests/src/MyInitialView.mxml b/manualtests/UnitTests/src/main/flex/MyInitialView.mxml
similarity index 98%
rename from manualtests/GenericTests/src/MyInitialView.mxml
rename to manualtests/UnitTests/src/main/flex/MyInitialView.mxml
index af4aea7..83497e1 100644
--- a/manualtests/GenericTests/src/MyInitialView.mxml
+++ b/manualtests/UnitTests/src/main/flex/MyInitialView.mxml
@@ -26,7 +26,7 @@
<fx:Style>
.title {
- font-size: 14pt;
+ font-size: 16px;
font-weight: bold;
}
.body {
@@ -180,9 +180,6 @@
<js:ViewDataBinding/>
</js:beads>
<js:Group id="cont" height="50" className="body">
- <js:beads>
- <js:VerticalFlexLayout />
- </js:beads>
<js:Label text="{PLATFORM} Cross-compiled Unit Tests" className="title" />
</js:Group>
<js:Group id="output" height="700" y="50" className="body">
diff --git a/manualtests/GenericTests/src/README.txt b/manualtests/UnitTests/src/main/flex/README.txt
similarity index 100%
copy from manualtests/GenericTests/src/README.txt
copy to manualtests/UnitTests/src/main/flex/README.txt
diff --git a/manualtests/GenericTests/src/TestClasses.as b/manualtests/UnitTests/src/main/flex/TestClasses.as
similarity index 100%
rename from manualtests/GenericTests/src/TestClasses.as
rename to manualtests/UnitTests/src/main/flex/TestClasses.as
diff --git a/manualtests/GenericTests/src/GenericTests.mxml b/manualtests/UnitTests/src/main/flex/UnitTests.mxml
similarity index 100%
rename from manualtests/GenericTests/src/GenericTests.mxml
rename to manualtests/UnitTests/src/main/flex/UnitTests.mxml
diff --git a/manualtests/GenericTests/src/flexUnitTests/CoreTester.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/CoreTester.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/CoreTester.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/CoreTester.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/JiraIssuesTester.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/JiraIssuesTester.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/JiraIssuesTester.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/JiraIssuesTester.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/ObservedBugsTester.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/ObservedBugsTester.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/ObservedBugsTester.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/ObservedBugsTester.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/ReflectionTester.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/ReflectionTester.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/ReflectionTester.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/ReflectionTester.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/core/BinaryDataTesterTest.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/core/BinaryDataTesterTest.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/core/BinaryDataTesterTest.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/core/BinaryDataTesterTest.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/core/StrandTesterTest.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/core/StrandTesterTest.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/core/StrandTesterTest.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/core/StrandTesterTest.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/jira/JiraTesterTest.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/jira/JiraTesterTest.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/jira/JiraTesterTest.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/jira/JiraTesterTest.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/observedbugs/ObservedBugTests.as
similarity index 78%
rename from manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/observedbugs/ObservedBugTests.as
index 8f3006a..ab84f15 100644
--- a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
+++ b/manualtests/UnitTests/src/main/flex/flexUnitTests/observedbugs/ObservedBugTests.as
@@ -34,9 +34,7 @@
} catch (e:Error) {
js = true;
}
- //if this next reference to 'check' is not included, then the above try/catch code
- // appears to be optimized away in js-release mode
- //todo: this is inconsistent with swf, need to create simple test case for jx compiler/gcc
+ //this was originally necessary to avoid a gcc-related bug in js for release mode only
if (check == null) {
js = true;
}
@@ -73,8 +71,10 @@
}
-
- [TestVariance(variance="JS",description="Variance in test, this test fails in JS-Release mode only")]
+ //This Observed bug is no longer present 0.9.0
+ //it may be related to a Google Closure Compiler update since it was originally observed
+ //leaving the tests in here for now...
+ //[TestVariance(variance="JS",description="Variance in test, this test fails in JS-Release mode only")]
[Test]
public function testTryCatchJSReleaseModeFails_b():void
{
@@ -84,18 +84,8 @@
} catch (e:Error) {
js = true;
}
-
- //if this next reference to 'check' variable is not included, then the above try/catch code
- // appears to be optimized away in js-release mode
- //todo: this is inconsistent with swf
- /* if (check == null) {
- js = true;
- }*/
- Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == true) : (js == false)));
-
+ Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js === true) : (js === false)));
}
-
-
}
}
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/ReflectionTesterTest.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/ReflectionTesterTest.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/ReflectionTesterTest.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/ReflectionTesterTest.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/ReflectionTesterTestAlias.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/ReflectionTesterTestAlias.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/ReflectionTesterTestAlias.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/ReflectionTesterTestAlias.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/ReflectionTesterTestUseCache.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/ReflectionTesterTestUseCache.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/ReflectionTesterTestUseCache.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/ReflectionTesterTestUseCache.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface2.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface2.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface2.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface2.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface3.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface3.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface3.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface3.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface4.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface4.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/ITestInterface4.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/ITestInterface4.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass1.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass1.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass1.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass1.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass2.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass2.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass2.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass2.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass3.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass3.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass3.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass3.as
diff --git a/manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass4.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass4.as
similarity index 100%
rename from manualtests/GenericTests/src/flexUnitTests/reflection/support/TestClass4.as
rename to manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass4.as
diff --git a/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass5.as b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass5.as
new file mode 100644
index 0000000..cc546c7
--- /dev/null
+++ b/manualtests/UnitTests/src/main/flex/flexUnitTests/reflection/support/TestClass5.as
@@ -0,0 +1,82 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 flexUnitTests.reflection.support
+{
+
+
+
+ public class TestClass5
+ {
+ //Note: do not change this test class unless you change the related tests to
+ //support any changes that might appear when testing reflection into it
+
+ public function TestClass5(){
+
+ }
+
+
+ [TestMeta(foo="instanceMethod")]
+ public function method():void{
+
+ }
+
+ [TestMeta(foo="instanceMethod")]
+ public function methodWithArgs(mandatory:String,optional:Boolean=true):void{
+
+ }
+
+ [TestMeta(foo="instanceVariable")]
+ public var testVar:String;
+
+ [TestMeta(foo="instanceAccessor")]
+ public function get testGetter():String{
+ return null
+ }
+
+ [TestMeta(foo="instanceAccessor")]
+ public function set testSetter(value:String):void{
+
+ }
+
+
+ [TestMeta(foo="staticMethod")]
+ public static function method():void{
+ }
+
+ [TestMeta(foo="staticMethod")]
+ public static function methodWithArgs(mandatory:String,optional:Boolean=true):void{
+ }
+
+ [TestMeta(foo="staticVariable")]
+ public static var testVar:String;
+
+ [TestMeta(foo="staticAccessor")]
+ public static function get testGetter():String{
+ return null
+ }
+
+ [TestMeta(foo="staticAccessor")]
+ public static function set testSetter(value:String):void{
+
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/manualtests/GenericTests/src/flexunit/framework/Assert.as b/manualtests/UnitTests/src/main/flex/flexunit/framework/Assert.as
similarity index 100%
rename from manualtests/GenericTests/src/flexunit/framework/Assert.as
rename to manualtests/UnitTests/src/main/flex/flexunit/framework/Assert.as
diff --git a/manualtests/GenericTests/src/flexunit/framework/AssertionFailedError.as b/manualtests/UnitTests/src/main/flex/flexunit/framework/AssertionFailedError.as
similarity index 100%
rename from manualtests/GenericTests/src/flexunit/framework/AssertionFailedError.as
rename to manualtests/UnitTests/src/main/flex/flexunit/framework/AssertionFailedError.as
diff --git a/manualtests/GenericTests/src/testshim/FlexJSUnitTestRunner.as b/manualtests/UnitTests/src/main/flex/testshim/FlexJSUnitTestRunner.as
similarity index 100%
rename from manualtests/GenericTests/src/testshim/FlexJSUnitTestRunner.as
rename to manualtests/UnitTests/src/main/flex/testshim/FlexJSUnitTestRunner.as
diff --git a/manualtests/GenericTests/src/testshim/TestResult.as b/manualtests/UnitTests/src/main/flex/testshim/TestResult.as
similarity index 100%
rename from manualtests/GenericTests/src/testshim/TestResult.as
rename to manualtests/UnitTests/src/main/flex/testshim/TestResult.as
diff --git a/manualtests/GenericTests/testsview/image/Flex.png b/manualtests/UnitTests/testsview/image/Flex.png
similarity index 100%
rename from manualtests/GenericTests/testsview/image/Flex.png
rename to manualtests/UnitTests/testsview/image/Flex.png
Binary files differ
diff --git a/manualtests/GenericTests/testsview/index.html b/manualtests/UnitTests/testsview/index.html
similarity index 88%
rename from manualtests/GenericTests/testsview/index.html
rename to manualtests/UnitTests/testsview/index.html
index 270b933..3007ab8 100644
--- a/manualtests/GenericTests/testsview/index.html
+++ b/manualtests/UnitTests/testsview/index.html
@@ -83,8 +83,9 @@
var JS_DEBUG = "JS-Debug";
var SWAP_TO_RELEASE = "Swap To "+JS_RELEASE;
var SWAP_TO_DEBUG = "Swap To "+JS_DEBUG;
- var debug = "../bin/js-debug/index.html";
- var release = "../bin/js-release/index.html";
+ var base = "../target/javascript/bin";
+ var debug = base + "/js-debug/index.html";
+ var release = base + "/js-release/index.html";
var jsIframe = document.getElementById("jsIframe");
var status = document.getElementById("jsStatus");
if (button && jsIframe) {
@@ -118,10 +119,10 @@
<button id="swapJsButton" onclick="swapJSBuild()" type="button" class="quoteButton TextButton" style="position: relative; display: inline-block;">Swap To JS-Release</button>
</div>
<div class="boxLeft">
- <iframe id="jsIframe" src="../bin/js-debug/index.html" frameborder="1" scrolling="no" height="100%" width="100%" align="left" ></iframe>
+ <iframe id="jsIframe" src="../target/javascript/bin/js-debug/index.html" frameborder="1" scrolling="no" height="100%" width="100%" align="left" ></iframe>
</div>
<div class="boxRight">
- <iframe id="swfIframe" src="../bin-debug/GenericTests.html" frameborder="1" scrolling="no" height="100%" width="100%" align="left" ></iframe>
+ <iframe id="swfIframe" src="../target/bin-debug/UnitTests.html" frameborder="1" scrolling="no" height="100%" width="100%" align="left" ></iframe>
</div>
</div>
</body>
diff --git a/manualtests/XMLTest/build.xml b/manualtests/XMLTest/build.xml
index a3012b2..c811bba 100644
--- a/manualtests/XMLTest/build.xml
+++ b/manualtests/XMLTest/build.xml
@@ -22,52 +22,26 @@
<project name="xmltest" default="main" basedir=".">
<property name="FLEXJS_HOME" location="../.."/>
<property name="example" value="XMLTest" />
+ <!-- use this to add keep metadata option -->
+ <property name="theme_arg" value="-keep-as3-metadata+=Event" />
<property name="swf.version" value="11" />
+ <property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
- <!-- use this to add keep metadata option -->
- <property name="theme_arg" value="-keep-as3-metadata+=Event" />
- <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 FlexJSUI.swc">
+ <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
</target>
<target name="clean">
<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>
</project>
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index 6b73d7f..851aeac 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -103,6 +103,11 @@
trace(xml1.toXMLString() == '<foo baz="true"/>');
var baz:XMLList = xml1.@baz;
trace("baz: " + xml1.@baz.toString() + " //true");
+ var xml3:XML = <root/>;
+ xml3.bar.baz = "baz";
+ xml3.foo.@boo = "boo";
+ trace("baz? " + xml3.bar.baz);
+ trace("boo? " + xml3.foo.@boo);
var child:XML = <pop><child name="Sam"/></pop>;
xml1.appendChild(child);
child = <pop><child name="George"/></pop>;
diff --git a/manualtests/build.xml b/manualtests/build.xml
index fc658f3..99f9b76 100644
--- a/manualtests/build.xml
+++ b/manualtests/build.xml
@@ -74,7 +74,9 @@
</target>
<target name="compile" description="Compile Examples" >
+ <ant dir="${basedir}/BubbleTest"/>
<ant dir="${basedir}/ContainerTest"/>
+ <ant dir="${basedir}/CursorTest"/>
<ant dir="${basedir}/DateChooserExample"/>
<ant dir="${basedir}/EffectsExample"/>
<ant dir="${basedir}/FlexJSTest_basic"/>
@@ -87,8 +89,11 @@
<ant dir="${basedir}/ImageTest"/>
<ant dir="${basedir}/LanguageTests"/>
<ant dir="${basedir}/ListsTest"/>
+ <ant dir="${basedir}/ProxyTest"/>
+ <ant dir="${basedir}/ReflectionTest"/>
<ant dir="${basedir}/RollEventsTest"/>
- <ant dir="${basedir}/ReflectionTest"/>
+ <ant dir="${basedir}/TLFEditTestFlexJS"/>
+ <ant dir="${basedir}/UnitTests" />
<ant dir="${basedir}/XMLTest"/>
</target>
@@ -103,9 +108,10 @@
</target>
<target name="clean" description="Cleans all SWCs and their resource bundles">
+ <ant dir="${basedir}/BubbleTest" target="clean"/>
<ant dir="${basedir}/ContainerTest" target="clean"/>
- <ant dir="${basedir}/DataBindingTestbed" target="clean"/>
- <ant dir="${basedir}/DateChooserExample" target="clean"/>
+ <ant dir="${basedir}/CursorTest" target="clean"/>
+ <ant dir="${basedir}/DateChooserExample" target="clean"/>
<ant dir="${basedir}/EffectsExample" target="clean"/>
<ant dir="${basedir}/FlexJSTest_basic" target="clean"/>
<ant dir="${basedir}/FlexJSTest_createjs" target="clean"/>
@@ -114,12 +120,14 @@
<ant dir="${basedir}/FlexJSTest_Panel" target="clean"/>
<ant dir="${basedir}/FlexJSTest_SVG" target="clean"/>
<ant dir="${basedir}/FormExample" target="clean"/>
- <ant dir="${basedir}/FormatExample" target="clean"/>
<ant dir="${basedir}/ImageTest" target="clean"/>
<ant dir="${basedir}/LanguageTests" target="clean"/>
<ant dir="${basedir}/ListsTest" target="clean"/>
+ <ant dir="${basedir}/ProxyTest" target="clean"/>
+ <ant dir="${basedir}/ReflectionTest" target="clean"/>
<ant dir="${basedir}/RollEventsTest" target="clean"/>
- <ant dir="${basedir}/ReflectionTest" target="clean"/>
+ <ant dir="${basedir}/TLFEditTestFlexJS" target="clean"/>
+ <ant dir="${basedir}/UnitTests" target="clean"/>
<ant dir="${basedir}/XMLTest" target="clean"/>
</target>
diff --git a/manualtests/build_example.xml b/manualtests/build_example.xml
index 62d98b6..586ac49 100644
--- a/manualtests/build_example.xml
+++ b/manualtests/build_example.xml
@@ -20,82 +20,243 @@
<project name="build_example" basedir=".">
+ <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+
+ <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+
+ <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
+ <and>
+ <not>
+ <isset property="FALCON_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
+ </and>
+ </condition>
+
+ <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+
+ <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+
+ <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
+ <and>
+ <not>
+ <isset property="FALCONJX_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file" />
+ </and>
+ </condition>
+
+ <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
+ <and>
+ <not>
+ <isset property="GOOG_HOME" />
+ </not>
+ <available file="${env.GOOG_HOME}/closure/goog/base.js" type="file" />
+ </and>
+ </condition>
+
+ <condition property="GOOG_HOME" value="${FLEXJS_HOME}/js/lib/google/closure-library">
+ <and>
+ <not>
+ <isset property="GOOG_HOME" />
+ </not>
+ <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js" type="file" />
+ </and>
+ </condition>
+
+ <condition property="adl" value="adl.exe">
+ <os family="windows"/>
+ </condition>
+
+ <condition property="adl" value="adl">
+ <os family="mac"/>
+ </condition>
+
+ <condition property="runtime" value="win">
+ <os family="windows"/>
+ </condition>
+
+ <condition property="runtime" value="mac">
+ <os family="mac"/>
+ </condition>
+
+ <property name="swf.version" value="14" />
+
+ <target name="get.browser" >
+ <condition property="browser" value="${env.ProgramFiles}/Mozilla Firefox/firefox.exe">
+ <and>
+ <os family="windows"/>
+ <available file="${env.ProgramFiles}/Mozilla Firefox/firefox.exe"
+ type="file" />
+ </and>
+ </condition>
+ <condition property="browser" value="${env.ProgramFiles(x86)}/Mozilla Firefox/firefox.exe">
+ <and>
+ <os family="windows"/>
+ <available file="${env.ProgramFiles(x86)}/Mozilla Firefox/firefox.exe"
+ type="file" />
+ </and>
+ </condition>
+ <condition property="browser" value="C:/Program Files/Internet Explorer/iexplore.exe">
+ <and>
+ <os family="windows"/>
+ <available file="C:/Program Files/Internet Explorer/iexplore.exe"
+ type="file" />
+ </and>
+ </condition>
+ <condition property="browser" value="/Applications/Firefox.app/Contents/MacOS/Firefox">
+ <and>
+ <os family="mac"/>
+ <available file="/Applications/Firefox.app/Contents/MacOS/Firefox"
+ type="file" />
+ </and>
+ </condition>
+ <condition property="browser" value="/Applications/Safari.app/Contents/MacOS/Safari">
+ <and>
+ <os family="mac"/>
+ <available file="/Applications/Safari.app/Contents/MacOS/Safari"
+ type="file" />
+ </and>
+ </condition>
+ <fail message="No browser found. See build_example.xml or set -Dbrowser=<path to browser>"
+ unless="browser"/>
+ </target>
+
<path id="lib.path">
<fileset dir="${FALCONJX_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCONJX_HOME}/lib" includes="jsc.jar"/>
</path>
+
<target name="compile" description="Compiles ${example}">
- <echo message="Compiling ${example}.swf"/>
+ <echo message="Compiling ${example}.swf"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
-
- <!-- Load the <compc> task. We can't do this at the <project> level -->
+ <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+ <condition property="srcDir" value="${basedir}/src" else="${basedir}/src/main/flex">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <condition property="destDir" value="${basedir}/bin-debug" else="${basedir}/target/bin-debug">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <condition property="jsDir" value="${basedir}" else="${basedir}/target/javascript">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <available file="${srcDir}/../config/compile-app-config.xml"
+ type="file"
+ property="optional_arg" value="-load-config+="${srcDir}/../config/compile-app-config.xml"" />
+
+ <condition property="targets" value="SWF,JSFlex" else="SWF">
+ <not>
+ <isset property="no.js"/>
+ </not>
+ </condition>
+ <!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+ <property name="config_arg" value="flex" />
+ <property name="file_suffix" value="mxml" />
+ <property name="optional_arg" value="-define+=CONFIG::dummy,true" />
<!-- this is a dummy var placeholder in case some example needs to define a theme
then they would set theme_arg=-theme=<path to theme> -->
<property name="theme_arg" value="-define+=CONFIG::theme,false" />
- <mxmlc fork="true"
- file="${basedir}/src/${example}.mxml"
- output="${basedir}/bin-debug/${example}.swf">
+ <mxmlc fork="true"
+ debug="true"
+ configname="${config_arg}"
+ swf-version="${swf.version}"
+ closure-lib="${GOOG_HOME}"
+ file="${srcDir}/${example}.${file_suffix}"
+ output="${destDir}/${example}.swf">
<jvmarg line="${mxmlc.jvm.args}"/>
- <arg value="+flexlib=${basedir}/frameworks" />
- <arg value="-debug" />
- <arg value="${theme_arg}" />
- <arg value="-swf-version=${swf.version}" />
- <arg value="-compiler.mxml.children-as-data" />
- <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 line="${optional_arg}" />
+ <arg value="${theme_arg}" />
+ <arg value="-targets=${targets}" />
<arg value="+playerglobal.version=${playerglobal.version}" />
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
- <arg value="-closure-lib=${GOOG_HOME}" />
+ <arg value="-js-output=${jsDir}" />
</mxmlc>
-
- <html-wrapper
- height="100%"
- width="100%"
- bgcolor="#ffffff"
- name="${example}"
- versionmajor="11"
- versionminor="1"
- versionrevision="0"
- output="${basedir}/bin-debug"/>
-
- <copy todir="${basedir}/bin-debug">
- <fileset dir="${basedir}/src">
+
+ <antcall target="build_example.wrapper">
+ <param name="output" value="${destDir}"/>
+ </antcall>
+
+ <copy todir="${destDir}">
+ <fileset dir="${srcDir}">
<include name="**/*.png" />
<include name="**/*.jpg" />
</fileset>
</copy>
- <copy todir="${basedir}/bin-debug/fonts">
+ <copy todir="${destDir}/fonts">
<fileset dir="${FLEX_HOME}/frameworks/fonts">
<include name="**/*.swf" />
</fileset>
</copy>
+
+ <antcall target="build_example.compile-js-release"/>
+ <antcall target="build_example.copy-app-xml" />
</target>
<target name="compileair" description="Compiles ${example}">
<echo message="Compiling ${example}.swf"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <condition property="srcDir" value="${basedir}/src" else="${basedir}/src/main/flex">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <condition property="destDir" value="${basedir}/bin-debug" else="${basedir}/target/bin-debug">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<property name="theme_arg" value="-define=CONFIG::theme,false" />
<mxmlc fork="true"
- file="${basedir}/src/${example}.mxml"
- output="${basedir}/bin-debug/${example}.swf">
+ file="${srcDir}/${example}.mxml"
+ output="${destDir}/${example}.swf">
<jvmarg line="${mxmlc.jvm.args}"/>
<arg value="+flexlib=${basedir}/frameworks" />
<arg value="+configname=air" />
<arg value="-debug" />
<arg value="${theme_arg}" />
<arg value="-target-player=${playerglobal.version}" />
- <arg value="-swf-version=${swf.version}" />
+ <arg value="-swf-version=${swfVersion}" />
<arg value="-compiler.mxml.children-as-data" />
<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" />
@@ -108,13 +269,13 @@
<arg value="-closure-lib=${GOOG_HOME}" />
</mxmlc>
- <copy todir="${basedir}/bin-debug">
- <fileset dir="${basedir}/src">
+ <copy todir="${destDir}">
+ <fileset dir="${srcDir}">
<include name="*.png" />
</fileset>
</copy>
- <copy todir="${basedir}/bin-debug">
- <fileset dir="${basedir}">
+ <copy todir="${destDir}">
+ <fileset dir="${srcDir}">
<include name="*-app.xml" />
</fileset>
</copy>
@@ -123,14 +284,23 @@
<target name="compileas" description="Compiles ${example}">
<echo message="Compiling ${example}.swf"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
-
+ <condition property="srcDir" value="${basedir}/src" else="${basedir}/src/main/flex">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <condition property="destDir" value="${basedir}/bin-debug" else="${basedir}/target/bin-debug">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<property name="theme_arg" value="-define=CONFIG::theme,false" />
<mxmlc fork="true"
- file="${basedir}/src/${example}.as"
- output="${basedir}/bin-debug/${example}.swf">
+ file="${srcDir}/${example}.as"
+ output="${destDir}/${example}.swf">
<jvmarg line="${mxmlc.jvm.args}"/>
<arg value="+flexlib=${basedir}/frameworks" />
<arg value="-debug" />
@@ -149,157 +319,74 @@
<arg value="-closure-lib=${GOOG_HOME}" />
</mxmlc>
+ <antcall target="build_example.wrapper">
+ <param name="output" value="${destDir}"/>
+ </antcall>
+ </target>
+
+
+ <target name="compile-js-release" unless="no.js">
+ <echo message="Compiling ${example}.js"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+ <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+ <property name="js.release.target" value="JSFlex" />
+ <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
+ <condition property="srcDir" value="${basedir}/src" else="${basedir}/src/main/flex">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <condition property="destDir" value="${basedir}" else="${basedir}/target">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <condition property="jsDir" value="${basedir}" else="${basedir}/target/javascript">
+ <not>
+ <isset property="maven_compat"/>
+ </not>
+ </condition>
+ <mxmlc fork="true"
+ debug="false"
+ configname="${config_arg}"
+ swf-version="${swf.version}"
+ closure-lib="${GOOG_HOME}"
+ file="${srcDir}/${example}.${file_suffix}">
+ <jvmarg line="${mxmlc.jvm.args}"/>
+ <arg line="${optional_arg}" />
+ <arg value="${theme_arg}" />
+ <arg value="${extlib_arg}" />
+ <arg value="-define=COMPILE::SWF,false" />
+ <arg value="-define=COMPILE::JS,true" />
+ <arg value="-targets=${js.release.target}" />
+ <arg value="+playerglobal.version=${playerglobal.version}" />
+ <arg value="-js-output=${jsDir}" />
+ </mxmlc>
+ </target>
+
+ <target name="check-air">
+ <condition property="is.air" value="true">
+ <equals arg1="${config_arg}" arg2="air" />
+ </condition>
+ </target>
+
+ <target name="wrapper" depends="check-air" unless="is.air">
+ <property name="output" value="${basedir}/bin-debug"/>
<html-wrapper
- height="300"
- width="400"
+ height="100%"
+ width="100%"
bgcolor="#ffffff"
name="${example}"
versionmajor="11"
versionminor="1"
versionrevision="0"
- output="${basedir}/bin-debug"/>
-
+ output="${output}"/>
</target>
-
- <target name="compilejs" description="Cross-compiles ${example}" unless="no.js">
- <echo message="Compiling ${example}.js"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
- <echo message="GOOG_HOME: ${GOOG_HOME}"/>
- <property name="theme_arg" value="-define=CONFIG::theme,false" />
- <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
-
- <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
- fork="true">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
- <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
- <arg value="-debug=false" />
- <arg value="${theme_arg}" />
- <arg value="-compiler.mxml.children-as-data" />
- <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="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" />
- <arg value="${extlib_arg}" />
- <arg value="-remove-circulars" />
- <arg value="-define=COMPILE::SWF,false" />
- <arg value="-define=COMPILE::JS,true" />
- <arg value="-js-output-type=FLEXJS" />
- <arg value="-closure-lib=${GOOG_HOME}" />
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" />
- <arg value="${basedir}/src/${example}.mxml" />
- </java>
- <fail>
- <condition>
- <not>
- <or>
- <equals arg1="${errorCode}" arg2="0" />
- <equals arg1="${errorCode}" arg2="2" />
- </or>
- </not>
- </condition>
- </fail>
- </target>
-
- <target name="compilejsair" description="Cross-compiles ${example}" unless="no.js">
- <echo message="Compiling ${example}.js"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
- <echo message="GOOG_HOME: ${GOOG_HOME}"/>
- <property name="theme_arg" value="-define=CONFIG::theme,false" />
- <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
-
- <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
- fork="true">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
- <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
- <arg value="+configname=air" />
- <arg value="-debug" />
- <arg value="${theme_arg}" />
- <arg value="-compiler.mxml.children-as-data" />
- <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="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" />
- <arg value="${extlib_arg}" />
- <arg value="-remove-circulars" />
- <arg value="-define=COMPILE::SWF,false" />
- <arg value="-define=COMPILE::JS,true" />
- <arg value="-js-output-type=FLEXJS" />
- <arg value="-closure-lib=${GOOG_HOME}" />
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" />
- <arg value="${basedir}/src/${example}.mxml" />
- </java>
- <fail>
- <condition>
- <not>
- <or>
- <equals arg1="${errorCode}" arg2="0" />
- <equals arg1="${errorCode}" arg2="2" />
- </or>
- </not>
- </condition>
- </fail>
- </target>
-
- <target name="compileasjs" description="Cross-compiles ${example}" unless="no.js">
- <echo message="Compiling ${example}.js"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
- <echo message="GOOG_HOME: ${GOOG_HOME}"/>
- <property name="theme_arg" value="-define=CONFIG::theme,false" />
- <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
-
- <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
- fork="true">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks"/>
- <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
- <arg value="-debug" />
- <arg value="${theme_arg}" />
- <arg value="-define=CONFIG::as_only,false" />
- <arg value="-define=CONFIG::js_only,true" />
- <arg value="-compiler.mxml.children-as-data" />
- <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="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" />
- <arg value="${extlib_arg}" />
- <arg value="-remove-circulars" />
- <arg value="-define=COMPILE::SWF,false" />
- <arg value="-define=COMPILE::JS,true" />
- <arg value="-js-output-type=FLEXJS" />
- <arg value="-closure-lib=${GOOG_HOME}" />
- <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" />
- <arg value="${basedir}/src/${example}.as" />
- </java>
- <fail>
- <condition>
- <not>
- <or>
- <equals arg1="${errorCode}" arg2="0" />
- <equals arg1="${errorCode}" arg2="2" />
- </or>
- </not>
- </condition>
- </fail>
+
+ <target name="copy-app-xml" depends="check-air" if="is.air">
+ <copy toDir="${basedir}/bin-debug" file="${basedir}/${example}-app.xml" />
+ <copy toDir="${basedir}/bin-release" file="${basedir}/${example}-app.xml" />
</target>
<macrodef name="html-wrapper">
@@ -387,5 +474,86 @@
</replace>
</sequential>
</macrodef>
+
+ <target name="check-resources" >
+ <available file="${basedir}/src/main/resources"
+ type="dir"
+ property="has-resources"/>
+ </target>
+ <target name="copy-resources" depends="check-resources" if="has-resources">
+ <copy todir="${basedir}/bin-debug">
+ <fileset dir="${basedir}/src/main/resources">
+ <include name="**/*.png" />
+ <include name="**/*.jpg" />
+ <include name="**/*.json" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="copy-js-resources" depends="check-resources" if="has-resources">
+ <mkdir dir="${basedir}/bin/js-debug/assets" />
+ <copy todir="${basedir}/bin/js-debug/assets" >
+ <fileset dir="${basedir}/src/main/resources/assets">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <mkdir dir="${basedir}/bin/js-release/assets" />
+ <copy todir="${basedir}/bin/js-release/assets" >
+ <fileset dir="${basedir}/src/main/resources/assets">
+ <include name="**" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="run.air">
+ <property name="profile" value="mobileDevice" />
+ <property name="screensize" value="640x960:640x960" />
+ <property name="dpi" value="240" />
+ <property name="platform" value="AND" />
+ <exec executable="${AIR_HOME}/bin/${adl}" dir="${basedir}/bin-${which}" failonerror="true">
+ <arg value="-runtime" />
+ <arg value="${AIR_HOME}/runtimes/air/${runtime}" />
+ <arg value="-profile" />
+ <arg value="${profile}" />
+ <arg value="-screensize" />
+ <arg value="${screensize}" />
+ <arg value="-XscreenDPI" />
+ <arg value="${dpi}" />
+ <arg value="-XversionPlatform" />
+ <arg value="${platform}" />
+ <arg value="${basedir}/bin-${which}/${example}-app.xml" />
+ </exec>
+ </target>
+
+ <target name="run.air.desktop">
+ <property name="profile" value="extendedDesktop" />
+ <property name="screensize" value="640x960:640x960" />
+ <property name="dpi" value="240" />
+ <property name="platform" value="AND" />
+ <exec executable="${AIR_HOME}/bin/${adl}" dir="${basedir}/bin-${which}" failonerror="true">
+ <arg value="-runtime" />
+ <arg value="${AIR_HOME}/runtimes/air/${runtime}" />
+ <arg value="-profile" />
+ <arg value="${profile}" />
+ <arg value="${basedir}/bin-${which}/${example}-app.xml" />
+ </exec>
+ </target>
+
+ <target name="compile.cordova" description="Executes the Cordova build script to run the app on a device." if="has.cordova">
+ <property name="mobile.platform" value="android" />
+ <ant antfile="${FLEXJS_HOME}/cordova-build.xml" target="main" >
+ <property name="projectdir" value="${basedir}" />
+ </ant>
+ <ant antfile="${FLEXJS_HOME}/cordova-build.xml" target="load-platform.${mobile.platform}" >
+ <property name="projectdir" value="${basedir}" />
+ </ant>
+ </target>
+
+ <target name="run.cordova" description="Executes the Cordova build script to run the app on a device." if="has.cordova">
+ <property name="mobile.platform" value="android" />
+ <ant antfile="${FLEXJS_HOME}/cordova-build.xml" target="run.${mobile.platform}" >
+ <property name="projectdir" value="${basedir}" />
+ </ant>
+ </target>
</project>
diff --git a/manualtests/pom.xml b/manualtests/pom.xml
new file mode 100644
index 0000000..dcfdb5f
--- /dev/null
+++ b/manualtests/pom.xml
@@ -0,0 +1,170 @@
+<?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.framework</groupId>
+ <artifactId>flexjs-framework-parent</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <relativePath />
+ </parent>
+
+ <groupId>org.apache.flex.flexjs.manualtests</groupId>
+ <artifactId>manualtests</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <properties>
+ <compiler.output-dir>${basedir}/target/javascript/bin/js-debug</compiler.output-dir>
+ </properties>
+ <name>Apache Flex - FlexJS: ManualTests</name>
+
+ <modules>
+ <module>UnitTests</module>
+ </modules>
+
+ <build>
+ <defaultGoal>compile</defaultGoal>
+ <sourceDirectory>src/main/flex</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <pluginManagement>
+ <plugins>
+ <!-- Copy the resources to the compiler output directory -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.1</version>
+ <configuration>
+ <outputDirectory>${compiler.output-dir}</outputDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>flexjs-maven-plugin</artifactId>
+ <version>${flexjs.compiler.version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins/>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Core</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Core</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Language</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Language</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>HTML</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>HTML</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Collections</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Collections</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Binding</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Binding</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Graphics</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Graphics</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ </dependencies>
+ <profiles>
+ <profile>
+ <id>release</id>
+ <properties>
+ <compiler.debug>false</compiler.debug>
+ <compiler.output-dir>${basedir}/target/javascript/bin/js-release</compiler.output-dir>
+ </properties>
+ </profile>
+ </profiles>
+</project>