flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [06/13] git commit: Test for FlexJS MXML implementation
Date Fri, 22 Mar 2013 07:05:31 GMT
Test for FlexJS MXML implementation

Added and changed the tests and support files for the FlexJS MXML implementation. All tests
are ignored because at the time of this commit, the MXMLFlexJS code is not yet implemented.


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/111537c3
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/111537c3
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/111537c3

Branch: refs/heads/develop
Commit: 111537c31561e8defa9796ec2dee8206b19ccad3
Parents: 6aed2c6
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Tue Mar 12 14:37:04 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Tue Mar 12 14:40:30 2013 +0100

----------------------------------------------------------------------
 .../mxml/flexjs/TestFlexJSMXMLApplication.java     |   27 +-
 .../mxml/flexjs/TestFlexJSMXMLDataStructures.java  |   31 +
 .../compiler/internal/test/FlexJSTestBase.java     |   51 ++-
 .../apache/flex/compiler/utils/EnvProperties.java  |   11 +
 .../flexjs/files/FlexJSTest_2013-03-11.js          |  195 +++++
 .../flexjs/files/MyInitialView_2013-03-11.js       |  582 +++++++++++++++
 6 files changed, 886 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/111537c3/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
index 6fd499b..d9584ff 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLApplication.java
@@ -10,6 +10,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
 
     // TODO (erikdebruin) this needs to become JS Goog output ;-)
 
+    @Ignore
     @Test
     public void testBasicFlexJSApp()
     {
@@ -24,6 +25,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
         assertOut("<Application>\n</Application>");
     }
 
+    @Ignore
     @Test
     public void testFlexJSAppWithEvent()
     {
@@ -39,6 +41,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
         assertOut("<Application initialize=\"MyModel(model).labelText = 'Hello World'\">\n</Application>");
     }
 
+    @Ignore
     @Test
     public void testFlexJSAppWithNode()
     {
@@ -53,6 +56,7 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
         assertOut("<Application>\n\t<beads></beads>\n</Application>");
     }
 
+    @Ignore
     @Test
     public void testFlexJSAppWithNodeAndChild()
     {
@@ -82,15 +86,30 @@ public class TestFlexJSMXMLApplication extends FlexJSTestBase
 
     @Ignore
     @Test
-    public void MXMLClassNode_flashDisplaySprite()
+    public void testFlexJSMainFile()
+    {
+        IMXMLFileNode node = compileMXML("FlexJSTest", true, env.ASJS
+                + "/examples/FlexJSTest_again", false);
+
+        mxmlBlockWalker.visitFile(node);
+
+        System.out.println(writer.toString());
+
+        assertOut("");
+    }
+    
+    @Ignore
+    @Test
+    public void testFlexJSSubFile()
     {
-        IMXMLFileNode node = compileMXML("FlexJSTest", true, asjsRoot
-                + "examples/FlexJSTest_again", false);
+        IMXMLFileNode node = compileMXML("MyInitialView", true, env.ASJS
+                + "/examples/FlexJSTest_again", false);
 
         mxmlBlockWalker.visitFile(node);
 
-        //System.out.println(writer.toString());
+        System.out.println(writer.toString());
 
         assertOut("");
     }
+
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/111537c3/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLDataStructures.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLDataStructures.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLDataStructures.java
new file mode 100644
index 0000000..c447494
--- /dev/null
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/TestFlexJSMXMLDataStructures.java
@@ -0,0 +1,31 @@
+package org.apache.flex.compiler.internal.codegen.mxml.flexjs;
+
+import org.apache.flex.compiler.internal.test.FlexJSTestBase;
+import org.apache.flex.compiler.internal.test.MXMLTestBase;
+import org.apache.flex.compiler.tree.mxml.IMXMLPropertySpecifierNode;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class TestFlexJSMXMLDataStructures extends FlexJSTestBase
+{
+
+    // MXMLProperties
+    
+    @Ignore
+    @Test
+    public void testBasicFlexJSDataStructure()
+    {
+        String code = ""
+                + "<basic:beads\">"
+                + "</basic:beads>";
+
+        IMXMLPropertySpecifierNode node = (IMXMLPropertySpecifierNode) getNode(
+                code, IMXMLPropertySpecifierNode.class,
+                MXMLTestBase.WRAP_LEVEL_DOCUMENT);
+
+        mxmlBlockWalker.visitPropertySpecifier(node);
+
+        assertOut("<beads>\n</beads>");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/111537c3/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
index 35a1fa3..6073415 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/FlexJSTestBase.java
@@ -7,6 +7,8 @@ import org.apache.flex.compiler.driver.IBackend;
 import org.apache.flex.compiler.internal.driver.mxml.flexjs.MXMLFlexJSBackend;
 import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
 import org.apache.flex.compiler.mxml.MXMLNamespaceMapping;
+import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLNode;
 import org.apache.flex.utils.FilenameNormalization;
 import org.junit.Ignore;
 
@@ -14,10 +16,6 @@ import org.junit.Ignore;
 public class FlexJSTestBase extends TestBase
 {
 
-    // TODO (erikdebruin) handle this path more like env.SDK or something
-    //                    similarly non-hard coded
-    protected final String asjsRoot = "../../asjs/";
-
     @Override
     public void setUp()
     {
@@ -40,7 +38,7 @@ public class FlexJSTestBase extends TestBase
                 + "/frameworks/libs/framework.swc")));
         libraries.add(new File(FilenameNormalization.normalize(env.SDK
                 + "\\frameworks\\libs\\rpc.swc")));
-        libraries.add(new File(asjsRoot + "frameworks/as/libs/FlexJSUI.swc"));
+        libraries.add(new File(env.ASJS + "/frameworks/as/libs/FlexJSUI.swc"));
 
         super.addLibraries(libraries);
     }
@@ -51,7 +49,7 @@ public class FlexJSTestBase extends TestBase
         namespaceMappings
                 .add(new MXMLNamespaceMapping(
                         "library://ns.apache.org/flexjs/basic", new File(
-                                asjsRoot + "frameworks/as/basic-manifest.xml")
+                                env.ASJS + "/frameworks/as/basic-manifest.xml")
                                 .getAbsolutePath()));
 
         super.addNamespaceMappings(namespaceMappings);
@@ -60,7 +58,7 @@ public class FlexJSTestBase extends TestBase
     @Override
     protected void addSourcePaths(List<File> sourcePaths)
     {
-        sourcePaths.add(new File(asjsRoot + "examples/FlexJSTest_again"));
+        sourcePaths.add(new File(env.ASJS + "/examples/FlexJSTest_again"));
 
         super.addSourcePaths(sourcePaths);
     }
@@ -71,4 +69,43 @@ public class FlexJSTestBase extends TestBase
         return new MXMLFlexJSBackend();
     }
 
+    //--------------------------------------------------------------------------
+    // Node "factory"
+    //--------------------------------------------------------------------------
+
+    public static final int WRAP_LEVEL_DOCUMENT = 1;
+
+    protected IMXMLNode getNode(String code, Class<? extends IMXMLNode> type,
+            int wrapLevel)
+    {
+        if (wrapLevel >= WRAP_LEVEL_DOCUMENT)
+            code = ""
+                    + "<basic:Application xmlns:basic=\"library://ns.apache.org/flexjs/basic\">"
+                    + code + "</basic:Application>";
+
+        IMXMLFileNode node = compileMXML(code);
+
+        return (IMXMLNode) findFirstDescendantOfType(node, type);
+    }
+
+    protected IMXMLNode findFirstDescendantOfType(IMXMLNode node,
+            Class<? extends IMXMLNode> nodeType)
+    {
+
+        int n = node.getChildCount();
+        for (int i = 0; i < n; i++)
+        {
+            IMXMLNode child = (IMXMLNode) node.getChild(i);
+            if (nodeType.isInstance(child))
+                return child;
+
+            IMXMLNode found = (IMXMLNode) findFirstDescendantOfType(child,
+                    nodeType);
+            if (found != null)
+                return found;
+        }
+
+        return null;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/111537c3/compiler.jx.tests/src/org/apache/flex/compiler/utils/EnvProperties.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/utils/EnvProperties.java b/compiler.jx.tests/src/org/apache/flex/compiler/utils/EnvProperties.java
index 976e4a9..efe356c 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/utils/EnvProperties.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/utils/EnvProperties.java
@@ -56,6 +56,11 @@ public class EnvProperties
      */
     public String FDBG;
 
+    /**
+     * ASJS_HOME
+     */
+    public String ASJS;
+    
     private static EnvProperties env;
 
     public static EnvProperties initiate()
@@ -105,6 +110,12 @@ public class EnvProperties
                 System.getenv("FLASHPLAYER_DEBUGGER"));
         System.out.println("environment property - FLASHPLAYER_DEBUGGER = "
                 + FDBG);
+
+        ASJS = p.getProperty("ASJS_HOME", System.getenv("ASJS_HOME"));
+        if (ASJS == null)
+            ASJS = FilenameNormalization
+                    .normalize("../../../repo_again/asjs/branches/develop");
+        System.out.println("environment property - ASJS_HOME = " + ASJS);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/111537c3/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_2013-03-11.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_2013-03-11.js b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_2013-03-11.js
new file mode 100644
index 0000000..5755e1c
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_2013-03-11.js
@@ -0,0 +1,195 @@
+goog.provide('FlexJSTest');
+
+goog.require('MyInitialView');
+goog.require('StockDataJSONItemConverter');
+goog.require('controllers.MyController');
+goog.require('models.MyModel');
+goog.require('org.apache.flex.core.Application');
+goog.require('org.apache.flex.core.SimpleCSSValuesImpl');
+goog.require('org.apache.flex.net.HTTPService');
+goog.require('org.apache.flex.net.JSONInputParser');
+goog.require('org.apache.flex.net.dataConverters.LazyCollection');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.Application}
+ */
+FlexJSTest = function() {
+    org.apache.flex.core.Application.call(this);
+
+    /**
+     * @private
+     * @type {org.apache.flex.core.SimpleCSSValuesImpl}
+     */
+    this.$ID0;
+
+    /**
+     * @private
+     * @type {MyInitialView}
+     */
+    this.$ID1;
+
+    /**
+     * @private
+     * @type {models.MyModel}
+     */
+    this.$ID2;
+
+    /**
+     * @private
+     * @type {controllers.MyController}
+     */
+    this.$ID3;
+
+    /**
+     * @private
+     * @type {org.apache.flex.net.JSONInputParser}
+     */
+    this.$ID6;
+
+    /**
+     * @private
+     * @type {StockDataJSONItemConverter}
+     */
+    this.$ID7;
+
+    /**
+     * @private
+     * @type {org.apache.flex.net.dataConverters.LazyCollection}
+     */
+    this.collection;
+
+    /**
+     * @private
+     * @type {org.apache.flex.net.HTTPService}
+     */
+    this.service;
+
+    /**
+     * @private
+     * @type {Array}
+     */
+    this.mxmldd;
+
+    /**
+     * @private
+     * @type {Array}
+     */
+    this.mxmldp;
+};
+goog.inherits(FlexJSTest, org.apache.flex.core.Application);
+
+
+
+/**
+ * @this {FlexJSTest}
+ * @expose
+ * @param {flash.events.Event} event
+ */
+FlexJSTest.prototype.$EH0 = function(event)
+{
+        this.model /* Cast to models.MyModel */.set_labelText("Hello World");
+};
+
+/**
+ * @this {FlexJSTest}
+ * @return {LazyCollection}
+ */
+FlexJSTest.prototype.get_collection = function()
+{
+    return this.collection;
+};
+
+/**
+ * @this {FlexJSTest}
+ * @param {LazyCollection} value
+ */
+FlexJSTest.prototype.set_collection = function(value)
+{
+    if (value != this.collection)
+        this.collection = value;
+};
+
+/**
+ * @this {FlexJSTest}
+ * @return {HTTPService}
+ */
+FlexJSTest.prototype.get_service = function()
+{
+    return this.service;
+};
+
+/**
+ * @this {FlexJSTest}
+ * @param {HTTPService} value
+ */
+FlexJSTest.prototype.set_service = function(value)
+{
+    if (value != this.service)
+        this.service = value;
+};
+
+/**
+ * @override
+ * @this {FlexJSTest}
+ * @return {Array} the Array of UI element descriptors.
+ */
+FlexJSTest.prototype.get_MXMLDescriptor = function()
+{
+    if (this.mxmldd == undefined)
+    {
+         /** @type {Array} */
+         var arr = goog.base(this, 'get_MXMLDescriptor');
+         /** @type {Array} */
+         var data = [
+];
+
+         if (arr)
+             this.mxmldd = arr.concat(data);
+         else
+             this.mxmldd = data;
+    }
+    return this.mxmldd;
+};
+
+/**
+ * @override
+ * @this {FlexJSTest}
+ * @return {Array} the Array of UI element descriptors.
+ */
+FlexJSTest.prototype.get_MXMLProperties = function()
+{
+    if (this.mxmldp == undefined)
+    {
+         /** @type {Array} */
+         var arr = goog.base(this, 'get_MXMLProperties');
+         /** @type {Array} */
+         var data = [
+5,
+'model',
+false, [models.MyModel, 1, '_id', true, '$ID2', 0, 0, null],
+'valuesImpl',
+false,
+[org.apache.flex.core.SimpleCSSValuesImpl, 1, '_id', true, '$ID0', 0, 0, null],
+'initialView',
+false,
+[MyInitialView, 1, '_id', true, '$ID1', 0, 0, null],
+'controller',
+false,
+[controllers.MyController, 1, '_id', true, '$ID3', 0, 0, null],
+'beads',
+null, [org.apache.flex.net.HTTPService, 2, 'id', true, 'service', 'beads', null, [org.apache.flex.net.dataConverters.LazyCollection,
3, 'inputParser', false, [org.apache.flex.net.JSONInputParser, 1, '_id', true, '$ID6', 0,
0, null], 'itemConverter', false, [StockDataJSONItemConverter, 1, '_id', true, '$ID7', 0,
0, null], 'id', true, 'collection', 0, 0, null], 0, 0, null],
+0,
+1,
+'initialize',
+this.$EH0
+];
+
+         if (arr)
+             this.mxmldp = arr.concat(data);
+         else
+             this.mxmldp = data;
+    }
+    return this.mxmldp;
+};
+

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/111537c3/compiler.jx.tests/test-files/flexjs/files/MyInitialView_2013-03-11.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_2013-03-11.js b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_2013-03-11.js
new file mode 100644
index 0000000..d4b3103
--- /dev/null
+++ b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_2013-03-11.js
@@ -0,0 +1,582 @@
+goog.provide('MyInitialView');
+
+goog.require('org.apache.flex.binding.ConstantBinding');
+goog.require('org.apache.flex.binding.SimpleBinding');
+goog.require('org.apache.flex.core.ViewBase');
+goog.require('org.apache.flex.html.staticControls.CheckBox');
+goog.require('org.apache.flex.html.staticControls.Label');
+goog.require('org.apache.flex.html.staticControls.List');
+goog.require('org.apache.flex.html.staticControls.RadioButton');
+goog.require('org.apache.flex.html.staticControls.TextArea');
+goog.require('org.apache.flex.html.staticControls.TextButton');
+goog.require('org.apache.flex.html.staticControls.TextInput');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.ViewBase}
+ */
+MyInitialView = function() {
+    org.apache.flex.core.ViewBase.call(this);
+
+    /**
+     * @private
+     * @type {org.apache.flex.binding.SimpleBinding}
+     */
+    this.$ID1;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.Label}
+     */
+    this.lbl;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.TextButton}
+     */
+    this.$ID2;
+
+    /**
+     * @private
+     * @type {org.apache.flex.binding.ConstantBinding}
+     */
+    this.$ID4;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.List}
+     */
+    this.list;
+
+    /**
+     * @private
+     * @type {org.apache.flex.binding.SimpleBinding}
+     */
+    this.$ID6;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.TextArea}
+     */
+    this.$ID7;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.TextInput}
+     */
+    this.input;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.TextButton}
+     */
+    this.$ID8;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.CheckBox}
+     */
+    this.checkbox;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.RadioButton}
+     */
+    this.$ID9;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.RadioButton}
+     */
+    this.$ID10;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.RadioButton}
+     */
+    this.$ID11;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.RadioButton}
+     */
+    this.$ID12;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.RadioButton}
+     */
+    this.$ID13;
+
+    /**
+     * @private
+     * @type {org.apache.flex.html.staticControls.RadioButton}
+     */
+    this.$ID14;
+
+    /**
+     * @private
+     * @type {Array}
+     */
+    this.mxmldd;
+
+    /**
+     * @private
+     * @type {Array}
+     */
+    this.mxmldp;
+};
+goog.inherits(MyInitialView, org.apache.flex.core.ViewBase);
+
+
+
+/**
+ * @this {MyInitialView}
+ * @expose
+ * @return {string}
+ */
+MyInitialView.prototype.get_symbol = function()
+{
+        return this.list.get_selectedItem() /* as String */;
+};
+
+/**
+ * @this {MyInitialView}
+ * @expose
+ * @return {string}
+ */
+MyInitialView.prototype.get_inputText = function()
+{
+        return this.input.get_text();
+};
+
+/**
+ * @this {MyInitialView}
+ * @expose
+ * @param {flash.events.MouseEvent} event
+ */
+MyInitialView.prototype.$EH0 = function(event)
+{
+        this.dispatchEvent(org.apache.flex.FlexGlobal.newObject(flash.events.Event, ["buttonClicked"]));
+};
+
+/**
+ * @this {MyInitialView}
+ * @expose
+ * @param {flash.events.Event} event
+ */
+MyInitialView.prototype.$EH1 = function(event)
+{
+        this.dispatchEvent(org.apache.flex.FlexGlobal.newObject(flash.events.Event, ["listChanged"]));
+};
+
+/**
+ * @this {MyInitialView}
+ * @expose
+ * @param {flash.events.MouseEvent} event
+ */
+MyInitialView.prototype.$EH2 = function(event)
+{
+        this.dispatchEvent(org.apache.flex.FlexGlobal.newObject(flash.events.Event, ["transferClicked"]));
+};
+
+/**
+ * @this {MyInitialView}
+ * @return {Label}
+ */
+MyInitialView.prototype.get_lbl = function()
+{
+    return this.lbl;
+};
+
+/**
+ * @this {MyInitialView}
+ * @param {Label} value
+ */
+MyInitialView.prototype.set_lbl = function(value)
+{
+    if (value != this.lbl)
+        this.lbl = value;
+};
+
+/**
+ * @this {MyInitialView}
+ * @return {List}
+ */
+MyInitialView.prototype.get_list = function()
+{
+    return this.list;
+};
+
+/**
+ * @this {MyInitialView}
+ * @param {List} value
+ */
+MyInitialView.prototype.set_list = function(value)
+{
+    if (value != this.list)
+        this.list = value;
+};
+
+/**
+ * @this {MyInitialView}
+ * @return {TextInput}
+ */
+MyInitialView.prototype.get_input = function()
+{
+    return this.input;
+};
+
+/**
+ * @this {MyInitialView}
+ * @param {TextInput} value
+ */
+MyInitialView.prototype.set_input = function(value)
+{
+    if (value != this.input)
+        this.input = value;
+};
+
+/**
+ * @this {MyInitialView}
+ * @return {CheckBox}
+ */
+MyInitialView.prototype.get_checkbox = function()
+{
+    return this.checkbox;
+};
+
+/**
+ * @this {MyInitialView}
+ * @param {CheckBox} value
+ */
+MyInitialView.prototype.set_checkbox = function(value)
+{
+    if (value != this.checkbox)
+        this.checkbox = value;
+};
+
+/**
+ * @override
+ * @this {MyInitialView}
+ * @return {Array} the Array of UI element descriptors.
+ */
+MyInitialView.prototype.get_MXMLDescriptor = function()
+{
+    if (this.mxmldd == undefined)
+    {
+         /** @type {Array} */
+         var arr = goog.base(this, 'get_MXMLDescriptor');
+         /** @type {Array} */
+         var data = [
+org.apache.flex.html.staticControls.Label,
+4,
+'x',
+true,
+100,
+'y',
+true,
+25,
+'id',
+true,
+'lbl',
+'beads',
+null, [org.apache.flex.binding.SimpleBinding, 5, 'eventName', true, 'labelTextChanged', 'sourceID',
true, 'applicationModel', 'sourcePropertyName', true, 'labelText', 'destinationPropertyName',
true, 'text', '_id', true, '$ID1', 0, 0, null],
+0,
+0,
+null,
+org.apache.flex.html.staticControls.TextButton,
+4,
+'text',
+true,
+'OK',
+'x',
+true,
+100,
+'y',
+true,
+50,
+'_id',
+true,
+'$ID2',
+0,
+1,
+'click',
+this.$EH0,
+null,
+org.apache.flex.html.staticControls.List,
+6,
+'x',
+true,
+200,
+'y',
+true,
+25,
+'width',
+true,
+100,
+'height',
+true,
+200,
+'id',
+true,
+'list',
+'beads',
+null, [org.apache.flex.binding.ConstantBinding, 4, 'sourceID', true, 'applicationModel',
'sourcePropertyName', true, 'strings', 'destinationPropertyName', true, 'dataProvider', '_id',
true, '$ID4', 0, 0, null],
+0,
+1,
+'change',
+this.$EH1,
+null,
+org.apache.flex.html.staticControls.TextArea,
+6,
+'x',
+true,
+320,
+'y',
+true,
+25,
+'width',
+true,
+150,
+'height',
+true,
+75,
+'_id',
+true,
+'$ID7',
+'beads',
+null, [org.apache.flex.binding.SimpleBinding, 5, 'eventName', true, 'labelTextChanged', 'sourceID',
true, 'applicationModel', 'sourcePropertyName', true, 'labelText', 'destinationPropertyName',
true, 'text', '_id', true, '$ID6', 0, 0, null],
+0,
+0,
+null,
+org.apache.flex.html.staticControls.TextInput,
+3,
+'x',
+true,
+320,
+'y',
+true,
+110,
+'id',
+true,
+'input',
+0,
+0,
+null,
+org.apache.flex.html.staticControls.TextButton,
+4,
+'text',
+true,
+'Transfer',
+'x',
+true,
+320,
+'y',
+true,
+138,
+'_id',
+true,
+'$ID8',
+0,
+1,
+'click',
+this.$EH2,
+null,
+org.apache.flex.html.staticControls.CheckBox,
+4,
+'x',
+true,
+320,
+'y',
+true,
+170,
+'text',
+true,
+'Check Me',
+'id',
+true,
+'checkbox',
+0,
+0,
+null,
+org.apache.flex.html.staticControls.RadioButton,
+6,
+'groupName',
+true,
+'group1',
+'text',
+true,
+'Apples',
+'value',
+true,
+0,
+'x',
+true,
+100,
+'y',
+true,
+130,
+'_id',
+true,
+'$ID9',
+0,
+0,
+null,
+org.apache.flex.html.staticControls.RadioButton,
+7,
+'groupName',
+true,
+'group1',
+'text',
+true,
+'Oranges',
+'value',
+true,
+1,
+'x',
+true,
+100,
+'y',
+true,
+150,
+'selected',
+true,
+true,
+'_id',
+true,
+'$ID10',
+0,
+0,
+null,
+org.apache.flex.html.staticControls.RadioButton,
+6,
+'groupName',
+true,
+'group1',
+'text',
+true,
+'Grapes',
+'value',
+true,
+2,
+'x',
+true,
+100,
+'y',
+true,
+170,
+'_id',
+true,
+'$ID11',
+0,
+0,
+null,
+org.apache.flex.html.staticControls.RadioButton,
+7,
+'groupName',
+true,
+'group2',
+'text',
+true,
+'Red',
+'value',
+true,
+16711680,
+'x',
+true,
+100,
+'y',
+true,
+230,
+'selected',
+true,
+true,
+'_id',
+true,
+'$ID12',
+0,
+0,
+null,
+org.apache.flex.html.staticControls.RadioButton,
+6,
+'groupName',
+true,
+'group2',
+'text',
+true,
+'Green',
+'value',
+true,
+32768,
+'x',
+true,
+100,
+'y',
+true,
+250,
+'_id',
+true,
+'$ID13',
+0,
+0,
+null,
+org.apache.flex.html.staticControls.RadioButton,
+6,
+'groupName',
+true,
+'group2',
+'text',
+true,
+'Blue',
+'value',
+true,
+255,
+'x',
+true,
+100,
+'y',
+true,
+270,
+'_id',
+true,
+'$ID14',
+0,
+0,
+null
+];
+
+         if (arr)
+             this.mxmldd = arr.concat(data);
+         else
+             this.mxmldd = data;
+    }
+    return this.mxmldd;
+};
+
+/**
+ * @override
+ * @this {MyInitialView}
+ * @return {Array} the Array of UI element descriptors.
+ */
+MyInitialView.prototype.get_MXMLProperties = function()
+{
+    if (this.mxmldp == undefined)
+    {
+         /** @type {Array} */
+         var arr = goog.base(this, 'get_MXMLProperties');
+         /** @type {Array} */
+         var data = [
+0,
+0,
+0
+];
+
+         if (arr)
+             this.mxmldp = arr.concat(data);
+         else
+             this.mxmldp = data;
+    }
+    return this.mxmldp;
+};
+


Mime
View raw message