Can someone explain to me why the Dictionary class ignores setPropertyIsEnumerable?
I found this error in bugs.adobe, it seems that the prototype might be involved in some insidious way
Here are some test codes:
var obj:Object = { 'a': 0, 'b': 1, 'c': 2 } obj.setPropertyIsEnumerable('a', false) trace("object\n") for (var op:* in obj) { trace(op) } var dict:Dictionary = new Dictionary() dict['a'] = 0 dict['b'] = 1 dict['c'] = 2 dict.setPropertyIsEnumerable('a', false) trace("dictionary\n") for (var dp:* in dict) { trace(dp) }
Output:
object c b dictionary c a b
Note that the dictionary still lists property βa,β although it was told not to.
source share