Unwrap integers before assigning properties. God, I wish I could just

autotranslate at the network layer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4159 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-05-31 01:15:58 +00:00
parent 77adfc15ec
commit 9e3c46c7a5
@@ -3,6 +3,7 @@ package com.threerings.presents.dobj {
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.Integer;
import com.threerings.util.StringBuilder;
/**
@@ -44,7 +45,17 @@ public class AttributeChangedEvent extends NamedEvent
if (_oldValue === UNSET_OLD_ENTRY) {
_oldValue = target[_name]; // fucking wack-ass language
}
target[_name] = _value;
// possibly convert the value
var v :Object = _value;
if (v is Integer) {
v = (v as Integer).value
} else {
// TODO: more!
}
target[_name] = v;
return true;
}