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:45 UTC
[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
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;
}