More crap, some new discoveries, backtracking, annoyance.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3918 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -26,6 +26,7 @@ public class ClassUtil
|
||||
|
||||
public static function getClassByName (cname :String) :Class
|
||||
{
|
||||
// see also ApplicationDomain.currentDomain.getClass(cname)
|
||||
return flash.util.getClassByName(cname);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,15 +4,44 @@ package com.threerings.util {
|
||||
* Marker class that allows us to use ActionScript's built-in hashing
|
||||
* function without hassle.
|
||||
*/
|
||||
public dynamic class SimpleMap extends Object
|
||||
public class SimpleMap extends Object
|
||||
{
|
||||
public function clear () :void
|
||||
{
|
||||
_data = new Object();
|
||||
}
|
||||
|
||||
public function get (key :Object) :Object
|
||||
{
|
||||
var skey :String = key.toString();
|
||||
return _data[skey];
|
||||
}
|
||||
|
||||
public function keys () :Array
|
||||
{
|
||||
var arr :Array = new Array();
|
||||
for (var skey :String in _data) {
|
||||
arr.push(skey);
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
public function put (key :Object, value :Object) :Object
|
||||
{
|
||||
var skey :String = key.toString();
|
||||
var oldValue :Object = _data[skey];
|
||||
_data[skey] = value;
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
public function remove (key :Object) :Object
|
||||
{
|
||||
// I'm not sure this really works
|
||||
var skey :String = key.toString();
|
||||
var value :Object = this[skey];
|
||||
this[skey] = undefined;
|
||||
var value :Object = _data[skey];
|
||||
delete _data[skey];
|
||||
return value;
|
||||
}
|
||||
|
||||
private var _data :Object = new Object();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.threerings.util {
|
||||
|
||||
import flash.util.describeType;
|
||||
|
||||
import mx.utils.ObjectUtil;
|
||||
|
||||
import com.threerings.io.ArrayMask;
|
||||
@@ -83,6 +81,7 @@ public dynamic class TypedArray extends Array
|
||||
* except gives it a clue as to how to stream to our server. */
|
||||
protected var _type :Class;
|
||||
|
||||
/** Whether or not the type of the array represents a final class. */
|
||||
protected var _final :Boolean;
|
||||
|
||||
protected var _delegate :Streamer;
|
||||
|
||||
Reference in New Issue
Block a user