You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/08/06 04:45:55 UTC

[royale-asjs] branch feature/MXRoyale updated (6ebab10 -> a37065d)

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a change to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


    from 6ebab10  use  to get tests to pass
     new 23e3deb  don't need to compile these.  They overwrite the JS output
     new 4e65bf1  emulation modules need to implement royale IModule so the compiler knows how to output the module
     new 1767b3f  default classes are needed in MXML.  May need to be added to other templates if they allow MXML use
     new a37065d  add a conversion function for the compiler to call if someone uses the top-level XML function

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 examples/mxroyale/tourdeflexmodules/build.xml      |  4 +++-
 frameworks/air-config-template.xml                 |  8 +++++++
 frameworks/flex-config-template.xml                |  8 +++++++
 .../MXRoyale/src/main/royale/mx/modules/IModule.as |  4 +++-
 frameworks/projects/XML/src/main/royale/XML.as     | 27 ++++++++++++++++++++++
 frameworks/royale-config-template.xml              |  8 +++++++
 6 files changed, 57 insertions(+), 2 deletions(-)


[royale-asjs] 04/04: add a conversion function for the compiler to call if someone uses the top-level XML function

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit a37065da8f70ad407f2445117d66f759f023ae02
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Aug 5 21:39:56 2018 -0700

    add a conversion function for the compiler to call if someone uses the top-level XML function
---
 frameworks/projects/XML/src/main/royale/XML.as | 27 ++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/frameworks/projects/XML/src/main/royale/XML.as b/frameworks/projects/XML/src/main/royale/XML.as
index 56b14ea..1dfd5b9 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -355,6 +355,33 @@ package
 			}
 		}
 
+        /**
+         *  mimics the top-level XML function
+         *  @royaleignorecoercion XMLList
+         */
+        public static function conversion(xml:*):XML
+        {
+            if (xml == null)
+            {
+                // throw TypeError
+                return null;
+            }
+            else if (xml.ROYALE_CLASS_INFO != null)
+            {
+                var className:String = xml.ROYALE_CLASS_INFO.names[0].name;
+                if (className == "XML")
+                    return xml;
+                else if (className == "XMLList")
+                {
+                    var xmlList:XMLList = xml as XMLList;
+                    if (xmlList.length() == 1)
+                        return xmlList[0];
+                    // throw TypeError
+                    return null;
+                }
+            }
+            return new XML(xml);
+        }
 
 		public function XML(xml:* = null)
 		{


[royale-asjs] 03/04: default classes are needed in MXML. May need to be added to other templates if they allow MXML use

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 1767b3f98b202002fac636601c98e5233503944b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Aug 5 19:40:28 2018 -0700

    default classes are needed in MXML.  May need to be added to other templates if they allow MXML use
---
 frameworks/air-config-template.xml    | 8 ++++++++
 frameworks/flex-config-template.xml   | 8 ++++++++
 frameworks/royale-config-template.xml | 8 ++++++++
 3 files changed, 24 insertions(+)

diff --git a/frameworks/air-config-template.xml b/frameworks/air-config-template.xml
index 969e517..af25137 100644
--- a/frameworks/air-config-template.xml
+++ b/frameworks/air-config-template.xml
@@ -128,6 +128,14 @@
       <!-- Specify a URI to associate with a manifest of components for use as MXML -->
       <!-- elements.                                                                -->
       <namespace>
+          <uri>http://ns.adobe.com/mxml/2009</uri>
+          <manifest>mxml-2009-manifest.xml</manifest>
+      </namespace>
+      <namespace>
+          <uri>http://www.adobe.com/2006/mxml</uri>
+          <manifest>mxml-manifest.xml</manifest>
+      </namespace>
+      <namespace>
           <uri>library://ns.apache.org/royale/basic</uri>
           
           <manifest>projects/Binding/src/main/resources/basic-manifest.xml</manifest>
diff --git a/frameworks/flex-config-template.xml b/frameworks/flex-config-template.xml
index 19be559..e8985da 100644
--- a/frameworks/flex-config-template.xml
+++ b/frameworks/flex-config-template.xml
@@ -130,6 +130,14 @@
       <!-- Specify a URI to associate with a manifest of components for use as MXML -->
       <!-- elements.                                                                -->
       <namespace>
+          <uri>http://ns.adobe.com/mxml/2009</uri>
+          <manifest>mxml-2009-manifest.xml</manifest>
+      </namespace>
+      <namespace>
+          <uri>http://www.adobe.com/2006/mxml</uri>
+          <manifest>mxml-manifest.xml</manifest>
+      </namespace>
+      <namespace>
           <uri>library://ns.apache.org/royale/basic</uri>
           
           <manifest>projects/Binding/src/main/resources/basic-manifest.xml</manifest>
diff --git a/frameworks/royale-config-template.xml b/frameworks/royale-config-template.xml
index 487b0ca..c4f013e 100644
--- a/frameworks/royale-config-template.xml
+++ b/frameworks/royale-config-template.xml
@@ -130,6 +130,14 @@
       <!-- Specify a URI to associate with a manifest of components for use as MXML -->
       <!-- elements.                                                                -->
       <namespace>
+          <uri>http://ns.adobe.com/mxml/2009</uri>
+          <manifest>mxml-2009-manifest.xml</manifest>
+      </namespace>
+      <namespace>
+          <uri>http://www.adobe.com/2006/mxml</uri>
+          <manifest>mxml-manifest.xml</manifest>
+      </namespace>
+      <namespace>
           <uri>library://ns.apache.org/royale/basic</uri>
           
           <manifest>projects/Binding/src/main/resources/basic-manifest.xml</manifest>


[royale-asjs] 01/04: don't need to compile these. They overwrite the JS output

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 23e3deb05266e6398aa1f7ff8a2f669369e6d387
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Aug 5 19:37:24 2018 -0700

    don't need to compile these.  They overwrite the JS output
---
 examples/mxroyale/tourdeflexmodules/build.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/mxroyale/tourdeflexmodules/build.xml b/examples/mxroyale/tourdeflexmodules/build.xml
index a95aa8e..02d7f48 100644
--- a/examples/mxroyale/tourdeflexmodules/build.xml
+++ b/examples/mxroyale/tourdeflexmodules/build.xml
@@ -117,8 +117,10 @@
 	
 	<target name="compile-shell" description="compile explorer shell">
 		<compile-mxml example="/explorer"/>
-		<compile-mxml-locales example="/loaderPanel"/>
+		<!-- not sure why these were compiled, they are not apps or modules
+         <compile-mxml-locales example="/loaderPanel"/>
 		<compile-mxml example="/SourceTab"/>
+         -->
 		<compile-mxml example="/Welcome"/>
 	</target>
 	


[royale-asjs] 02/04: emulation modules need to implement royale IModule so the compiler knows how to output the module

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 4e65bf136795a8e3611878654a8946f702f9b233
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Aug 5 19:39:50 2018 -0700

    emulation modules need to implement royale IModule so the compiler knows how to output the module
---
 frameworks/projects/MXRoyale/src/main/royale/mx/modules/IModule.as | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/IModule.as b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/IModule.as
index f659463..e077cfa 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/IModule.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/IModule.as
@@ -19,6 +19,8 @@
 
 package mx.modules
 {
+    import org.apache.royale.core.IModule
+        
     /**
      *  An interface that marks a class as being a module.
      * 
@@ -29,7 +31,7 @@ package mx.modules
      *  @playerversion AIR 1.1
      *  @productversion Flex 4
      */
-    public interface IModule
+    public interface IModule extends org.apache.royale.core.IModule
     {
         
     }