Scrapped using a Comparable for the keys to a DSet on this side of things.
- There is no such thing as Comparable in ActionScript, I had made my own, but String (one of the most common keys) couldn't implement it, and String is a final class (like in Java). It would be a huge inconvenience to have to wrap String objects. - The language also has no .equals() method in the base class. The strict equality operator (===) works like equals() except that objects that aren't one of the base types (String, Number, Boolean, int) are compared by reference. I added a "Equalable" interface, if the key in a DSet implements that interface then equals() is called, otherwise the strict equality operator is used. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3897 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -31,11 +31,9 @@ public class InvocationRegistration
|
||||
}
|
||||
|
||||
// documentation inherited from interface DSetEntry
|
||||
public function getKey () :Comparable
|
||||
public function getKey () :Object
|
||||
{
|
||||
return null; // TODO receiverCode;
|
||||
// TODO: maybe we drop the concept of Comparable and just
|
||||
// use any old objects: screw performance
|
||||
return receiverCode;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
|
||||
Reference in New Issue
Block a user