AS3 dictionary setPropertyIsEnumerable is ignored

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.

+4
source share
1 answer

Here is my hunch ... Dictionary overrides nextName to return dictionary keys. He uses his own implementation in a way that ignores setPropertyIsEnumerable .

I can’t prove it yet, but I’m trying. I thought I would drop this hypothesis to see if it sparks anything.

0
source

All Articles