This blog is a knowledge base...where I clip cool tricks and urls

Hashtable for Flex?

clipped from

Classpublic dynamic class Dictionary
InheritanceDictionary Inheritance Object

The Dictionary class lets you create a dynamic collection of properties, which uses strict equality
(===) for key comparison. When an object is used as a key, the object's
identity is used to look up the object, and not the value returned from calling toString() on it.

The following statements show the relationship between a Dictionary object and a key object:

 var dict = new Dictionary();
var obj = new Object();
var key:Object = new Object();
key.toString = function() { return "key" }
dict[key] = "Letters";
obj["key"] = "Letters";
dict[key] == "Letters"; // true
obj["key"] == "Letters"; // true
obj[key] == "Letters"; // true because key == "key" is true b/c key.toString == "key"
dict["key"] == "Letters"; // false because "key" === key is false
delete dict[key]; //removes the key

See also

 blog it

1 comment:

Anonymous said...

Yes indeed, in some moments I can phrase that I agree with you, but you may be considering other options.
to the article there is still a suspect as you did in the go over like a lead balloon a fall in love with efflux of this solicitation charge lpg ?
I noticed the catch-phrase you have not used. Or you functioning the dark methods of helping of the resource. I take a week and do necheg