Added some new functionality and plugged possible bugs.
New functions incorporated:
- function insertKeyValue(keyValueCombo:Object):void >>Argument passed in is used as both Key and Value
- function insertArray(arr:Array):void >>Takes an Array object as argument and inserts each Array element in the MyDictionary Object
- function clone():MyDictionary >>Performs a deep copy
- function getValue(key : Object):Object >>Returns the corresponding value for the given key
Modified:
- function getValues(asArray:Boolean=true):Object >>Can handle either Array or ArrayCollection argument depending on the boolean value passed
- function getKeys(asArray:Boolean=true):Object >>Can handle either Array or ArrayCollection argument depending on the boolean value passed
Source File: MyDictionary.as MDIllegalObjectException.as
(Replace the “.as_.txt” extension to “.as” before using the file)
Feel free to modify the source code and if any bugs are found, please do comment back to the post as it will be helpful to others.
Login