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/10/14 21:42:41 UTC

[royale-asjs] branch develop updated (2352e01 -> 602a73e)

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

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


    from 2352e01  fix CompressedObject
     new 9c02182  swf-side support for old Flex ResourceBundles
     new fa62228  pick up info for resourcemanager
     new ce6df1b  get resources working
     new 7c291cb  enable resources in ArrayList for testing, but leave bundle commented out until we figure out how to download the Flex bundles
     new ff116db  comment out Flex bundles until we figure out how to download them
     new 602a73e  test for Flex resources

The 6 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:
 .../src/main/royale/mx/collections/ArrayList.as    | 44 ++++++++++++----------
 .../src/main/royale/mx/managers/SystemManager.as   |  4 +-
 .../royale/mx/resources/ResourceManagerImpl.as     |  2 +
 .../{LocaleTest => ResourceManagerTest}/build.xml  |  4 +-
 .../src/ResourceManagerTest.mxml                   | 43 +++++++++++++--------
 manualtests/build_example.xml                      |  4 ++
 6 files changed, 62 insertions(+), 39 deletions(-)
 copy manualtests/{LocaleTest => ResourceManagerTest}/build.xml (92%)
 copy examples/mxroyale/HelloWorld/src/main/royale/HelloWorld.mxml => manualtests/ResourceManagerTest/src/ResourceManagerTest.mxml (54%)


[royale-asjs] 06/06: test for Flex resources

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

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

commit 602a73e53c74c0c048f315a83752575aec50578d
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 14 14:42:23 2018 -0700

    test for Flex resources
---
 manualtests/ResourceManagerTest/build.xml          | 44 +++++++++++++++++++
 .../src/ResourceManagerTest.mxml                   | 49 ++++++++++++++++++++++
 2 files changed, 93 insertions(+)

diff --git a/manualtests/ResourceManagerTest/build.xml b/manualtests/ResourceManagerTest/build.xml
new file mode 100644
index 0000000..7f57311
--- /dev/null
+++ b/manualtests/ResourceManagerTest/build.xml
@@ -0,0 +1,44 @@
+<?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="ResourceManagerTest" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../.."/>
+    <property name="example" value="ResourceManagerTest" />
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+	<property file="${ROYALE_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${ROYALE_HOME}"/>
+	
+    
+    <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>
+
+</project>
diff --git a/manualtests/ResourceManagerTest/src/ResourceManagerTest.mxml b/manualtests/ResourceManagerTest/src/ResourceManagerTest.mxml
new file mode 100644
index 0000000..65e964b
--- /dev/null
+++ b/manualtests/ResourceManagerTest/src/ResourceManagerTest.mxml
@@ -0,0 +1,49 @@
+<?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.
+
+-->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+               xmlns:js="library://ns.apache.org/royale/basic"
+               xmlns:mx="library://ns.apache.org/royale/mx"
+               xmlns:local="*">
+
+    <fx:Script>
+		<![CDATA[
+            import mx.collections.ArrayList;
+            
+			private function test():void
+			{
+                var al:ArrayList = new ArrayList();
+                try 
+                {
+                    al.getItemAt(100);
+                } 
+                catch (e:Error)
+                {
+                    output.text = e.message;
+                }
+			}
+		]]>
+	</fx:Script>
+
+    <mx:Label text="ResourceManager Test"/>
+
+    <mx:Button label="Test" click="test()"/>
+    
+    <mx:Label id="output" text="output goes here"/>
+</mx:Application>


[royale-asjs] 01/06: swf-side support for old Flex ResourceBundles

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

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

commit 9c02182628151b1a7dcad23c7ac194f69da2fb7b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri Oct 12 11:42:48 2018 -0700

    swf-side support for old Flex ResourceBundles
---
 .../projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as      | 2 --
 1 file changed, 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
index 7542e15..539a7e5 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
@@ -2548,13 +2548,11 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
         */
         root.loaderInfo.removeEventListener(Event.INIT, initHandler);
 
-        /*
         if (!SystemManagerGlobals.info)
             SystemManagerGlobals.info = info();
         if (!SystemManagerGlobals.parameters)
             SystemManagerGlobals.parameters = loaderInfo.parameters;
 
-        */
         var docFrame:int = (totalFrames == 1)? 0 : 1;
         addEventListener(Event.ENTER_FRAME, docFrameListener);
         addFrameScript(docFrame, docFrameHandler);


[royale-asjs] 03/06: get resources working

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

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

commit ce6df1b91a4c8d154199bcc98f4b31fabe8c6666
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 14 14:38:13 2018 -0700

    get resources working
---
 .../MXRoyale/src/main/royale/mx/resources/ResourceManagerImpl.as        | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/resources/ResourceManagerImpl.as b/frameworks/projects/MXRoyale/src/main/royale/mx/resources/ResourceManagerImpl.as
index 19126e6..a8c6086 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/resources/ResourceManagerImpl.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/resources/ResourceManagerImpl.as
@@ -844,6 +844,8 @@ public class ResourceManagerImpl extends EventDispatcher implements IResourceMan
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
+     * 
+     *  @royaleignorecoercion mx.resources.IResourceBundle
      */
     public function findResourceBundleWithResource(
                         bundleName:String, resourceName:String):IResourceBundle


[royale-asjs] 02/06: pick up info for resourcemanager

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

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

commit fa62228ed6352eab68859d2e8a0944b4ef1007e8
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 14 14:34:57 2018 -0700

    pick up info for resourcemanager
---
 .../projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
index 539a7e5..db464e6 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
@@ -2944,6 +2944,8 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
         var body:HTMLElement = document.getElementsByTagName('body')[0];
         body.appendChild(element);
         
+        SystemManagerGlobals.info = info();
+        
         var mixinList:Array = info()["mixins"];
         if (mixinList && mixinList.length > 0)
         {


[royale-asjs] 04/06: enable resources in ArrayList for testing, but leave bundle commented out until we figure out how to download the Flex bundles

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

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

commit 7c291cbc219dc8f005f157659c9e9a1a6c18dbcf
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 14 14:40:25 2018 -0700

    enable resources in ArrayList for testing, but leave bundle commented out until we figure out how to download the Flex bundles
---
 .../src/main/royale/mx/collections/ArrayList.as    | 44 ++++++++++++----------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ArrayList.as b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ArrayList.as
index 7923f79..0375f72 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ArrayList.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/collections/ArrayList.as
@@ -27,10 +27,10 @@ import mx.events.PropertyChangeEventKind;
 import org.apache.royale.events.Event;
 import org.apache.royale.events.EventDispatcher;
 import org.apache.royale.events.IEventDispatcher;
-/*
+
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
-*/
+
 import mx.utils.ArrayUtil;
 /*
 import mx.utils.UIDUtil;
@@ -54,6 +54,14 @@ import org.apache.royale.reflection.getQualifiedClassName;
  */
 [Event(name="collectionChange", type="mx.events.CollectionEvent")]
 
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[RemoteClass(alias="flex.messaging.io.ArrayList")]
+
+//[ResourceBundle("collections")]
+
 [DefaultProperty("source")]
 
 /**
@@ -121,8 +129,8 @@ public class ArrayList extends EventDispatcher
      *  @private
      *  Used for accessing localized Error messages.
      */
-//    private var resourceManager:IResourceManager =
-//        ResourceManager.getInstance();
+    private var resourceManager:IResourceManager =
+        ResourceManager.getInstance();
                                     
     /**
      *  @private 
@@ -296,10 +304,9 @@ public class ArrayList extends EventDispatcher
     {
         if (index < 0 || index >= length)
         {
-//            var message:String = resourceManager.getString(
-//                "collections", "outOfBounds", [ index ]);
-//            throw new RangeError(message);
-			trace("getItemAt throwing RangeError - not implemented");
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+            throw new RangeError(message);
 			return null;
         }
             
@@ -325,10 +332,9 @@ public class ArrayList extends EventDispatcher
     {
         if (index < 0 || index >= length) 
         {
-//            var message:String = resourceManager.getString(
-//                "collections", "outOfBounds", [ index ]);
-//            throw new RangeError(message);
-			trace("setItemAt throwing RangeError - not implemented");
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+            throw new RangeError(message);
 			return null;
         }
         
@@ -420,10 +426,9 @@ public class ArrayList extends EventDispatcher
         }
         else
         {
-//            var message:String = resourceManager.getString(
-//                "collections", "outOfBounds", [ index ]);
-//            throw new RangeError(message);
-			trace("addItemAt throwing RangeError - not implemented");
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+            throw new RangeError(message);
 			return;
         }
 
@@ -551,10 +556,9 @@ public class ArrayList extends EventDispatcher
         }
         else
         {
-//            var message:String = resourceManager.getString(
-//                "collections", "outOfBounds", [ index ]);
-//            throw new RangeError(message);
-			trace("removeItemAt throwing RangeError - not implemented");
+            var message:String = resourceManager.getString(
+                "collections", "outOfBounds", [ index ]);
+            throw new RangeError(message);
 			return null;
         }
 


[royale-asjs] 05/06: comment out Flex bundles until we figure out how to download them

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

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

commit ff116dbda4e8508fbac150b2911e53eb0a57a547
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Oct 14 14:41:58 2018 -0700

    comment out Flex bundles until we figure out how to download them
---
 manualtests/build_example.xml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/manualtests/build_example.xml b/manualtests/build_example.xml
index 4a20476..cf67ea4 100644
--- a/manualtests/build_example.xml
+++ b/manualtests/build_example.xml
@@ -180,6 +180,10 @@
 			<arg value="-targets=${targets}" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
 			<arg value="-js-output=${jsDir}" />
+            <!--
+            <arg value="-js-library-path+=/Users/aharui/git/flex/master/flex-sdk/frameworks/locale/{locale}" />
+            <arg value="-library-path+=/Users/aharui/git/flex/master/flex-sdk/frameworks/locale/{locale}" />
+             -->
         </mxmlc>
 
         <antcall target="build_example.wrapper">