Can anyone explain to me why commandMap
(in Command.as), proxyMap
(in Model.as) and mediatorMap
(in View.as) are all Arrays
, even if their variable names accurately describe them as Maps
?e.g. commandMap = new Array();
Arrays in ActionScript are numerical and not associative.
And the ActionScript reference states:
Do not use the Array class to create associative arrays (also called hashes), which are data structures that contain named elements instead of numbered elements. To create associative arrays, use the Object class. Although ActionScript permits you to create associative arrays using the Array class, you cannot use any of the Array class methods or properties with associative arrays.
Therefore i would propose to change them into Objects
This is not a performance or functionality issue, but as everything in PureMVC builds upon logic, this seems very logical to me.
Using Arrays will add functionality to the Maps, that is never used.