You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/01/11 21:31:58 UTC
svn commit: r1432272 - in
/flex/asjs/branches/develop/examples/FlexJSTest_again: FlexJSTest.as
FlexJSTest.mxml FlexJSTestMXML.mxml MyInitialView.as MyInitialView.mxml
MyInitialViewMXML.mxml MySimpleValuesImpl.as controllers/MyController.as
Author: aharui
Date: Fri Jan 11 20:31:57 2013
New Revision: 1432272
URL: http://svn.apache.org/viewvc?rev=1432272&view=rev
Log:
Modify FlexJSTest_again to use real MXML files. FalconJS can now compile them into .js files.
FlexJSTest folder will be removed later as it is now obsolete.
Added:
flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml
- copied, changed from r1418496, incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTestMXML.mxml
flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml
- copied, changed from r1418496, incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialViewMXML.mxml
Removed:
flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.as
flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTestMXML.mxml
flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.as
flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialViewMXML.mxml
Modified:
flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as
flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as
Copied: flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml (from r1418496, incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTestMXML.mxml)
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml?p2=flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml&p1=incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTestMXML.mxml&r1=1418496&r2=1432272&rev=1432272&view=diff
==============================================================================
--- incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTestMXML.mxml (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/FlexJSTest.mxml Fri Jan 11 20:31:57 2013
@@ -19,10 +19,11 @@ limitations under the License.
-->
<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:local="*"
- xmlns:basic="http://ns.apache.org/flex/basic"
- xmlns:html="http://ns.apache.org/flex/html"
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
xmlns:models="models.*"
- xmlns:controllers="controllers.*">
+ xmlns:controllers="controllers.*"
+ initialize="model.labelText='Hello World'"
+ >
<basic:valuesImpl>
<local:MySimpleValuesImpl />
</basic:valuesImpl>
Copied: flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml (from r1418496, incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialViewMXML.mxml)
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml?p2=flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml&p1=incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialViewMXML.mxml&r1=1418496&r2=1432272&rev=1432272&view=diff
==============================================================================
--- incubator/flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialViewMXML.mxml (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/MyInitialView.mxml Fri Jan 11 20:31:57 2013
@@ -18,9 +18,15 @@ limitations under the License.
-->
<basic:ViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:basic="http://ns.apache.org/flex/basic"
- xmlns:html="http://ns.apache.org/flex/html"
- >
- <basic:Label id="lbl" x="100" y="25" text="{model.labelText}" />
- <basic:Button text="OK" x="100" y="75" click="dispatchEvent(new Event('buttonClicked'))" />
+ xmlns:basic="library://ns.apache.org/flexjs/basic"
+ >
+ <basic:Label id="lbl" x="100" y="25" >
+ <basic:beads>
+ <basic:SimpleBinding eventName="labelTextChanged"
+ sourceID="applicationModel"
+ sourcePropertyName="labelText"
+ destinationPropertyName="text" />
+ </basic:beads>
+ </basic:Label>
+ <basic:TextButton text="OK" x="100" y="75" click="dispatchEvent(new Event('buttonClicked'))" />
</basic:ViewBase>
Modified: flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as?rev=1432272&r1=1432271&r2=1432272&view=diff
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/MySimpleValuesImpl.as Fri Jan 11 20:31:57 2013
@@ -29,7 +29,6 @@ package
{
public function MySimpleValuesImpl()
{
- super();
values = {
ITextButtonBead: TextButtonBead,
ITextBead: TextFieldBead,
Modified: flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as
URL: http://svn.apache.org/viewvc/flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as?rev=1432272&r1=1432271&r2=1432272&view=diff
==============================================================================
--- flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as (original)
+++ flex/asjs/branches/develop/examples/FlexJSTest_again/controllers/MyController.as Fri Jan 11 20:31:57 2013
@@ -20,15 +20,21 @@ package controllers
{
import flash.events.Event;
- public class MyController
+ import org.apache.flex.core.IDocument;
+ import org.apache.flex.core.Application;
+
+ public class MyController implements IDocument
{
- public function MyController(app:FlexJSTest)
+ public function MyController(app:Application = null)
{
- this.app = app;
- app.addEventListener("viewChanged", viewChangeHandler);
+ if (app)
+ {
+ this.app = app;
+ app.addEventListener("viewChanged", viewChangeHandler);
+ }
}
- private var app:FlexJSTest;
+ private var app:Application;
private function viewChangeHandler(event:Event):void
{
@@ -39,5 +45,12 @@ package controllers
{
app.model.labelText = "Hello Universe";
}
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.app = document as Application;
+ app.addEventListener("viewChanged", viewChangeHandler);
+ }
+
}
}
\ No newline at end of file