Checkpoint, I've got an interactive 2d scene mostly working.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4151 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -28,8 +28,16 @@ public class ClassUtil
|
||||
|
||||
public static function getClassByName (cname :String) :Class
|
||||
{
|
||||
// see also ApplicationDomain.currentDomain.getClass(cname)
|
||||
return (getDefinitionByName(cname.replace("::", ".")) as Class);
|
||||
try {
|
||||
// see also ApplicationDomain.currentDomain.getClass(cname)
|
||||
return (getDefinitionByName(cname.replace("::", ".")) as Class);
|
||||
|
||||
} catch (error :ReferenceError) {
|
||||
var log :Log = Log.getLog(ClassUtil);
|
||||
log.warning("Unknown class: " + cname);
|
||||
log.logStackTrace(error);
|
||||
}
|
||||
return null; // error case
|
||||
}
|
||||
|
||||
public static function isFinal (type :Class) :Boolean
|
||||
|
||||
@@ -268,6 +268,7 @@ public class Hashtable
|
||||
*/
|
||||
protected function indexFor (hash :int) :int
|
||||
{
|
||||
// TODO: improve?
|
||||
return Math.abs(hash) % _entries.length;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user