From e1d83cade02491098a79022c97140e260173ec1d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 22 Sep 2008 18:15:04 +0000 Subject: [PATCH] Make it possible to create and populate a TypedArray in a single expression. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5386 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/io/TypedArray.as | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/io/TypedArray.as b/src/as/com/threerings/io/TypedArray.as index c3db92ff4..154eeb061 100644 --- a/src/as/com/threerings/io/TypedArray.as +++ b/src/as/com/threerings/io/TypedArray.as @@ -75,12 +75,15 @@ public dynamic class TypedArray extends Array * Adds all of the elements of the supplied array to this typed array. The types of the * elements of the target array must, of course, be of the type specified for this array * otherwise badness will ensue. + * + * @return this array instance for handy call chainability. */ - public function addAll (other :Array) :void + public function addAll (other :Array) :TypedArray { for (var ii :int = 0; ii < other.length; ii++) { push(other[ii]); } + return this; } public function getJavaType () :String