Hey,
Ok so here is my problem. I have an array collection which is an
associative array (keys/values) and I want to get the key name from
each position in the loop. This is easily done in python using
myarray.keys() or myarray.values() which will return a list. My
problem is I can't find a similar method to do this in flex. Flex
assumes that I already know the key in order to get the value.
However, I don't know the keys because they are dynamic (they were
loaded from a file that the user made)
This is a python list of dictionaries, but its the same format as a
associative array collection
[
{'command': 'dccmd capture server', '--slotid': 'OEM:01'},
{'command': 'dccmd deploy server', '--slotid': 'OEM:01', '--repo':
'nfs://pathtorepo'},
{'command': 'ridleserver', '--slotid': 'OEM:01'},
{'command': 'rshowslot', '--slotid': 'OEM:01'}
]
However keep in mind that from the list above I am only using one item
at a time.
var pos:int = commands.getItemIndex(cmdbox.selectedLabel);
var args:ArrayCollection =
ArrayCollection(ArrayUtil.toArray( cmdlist.getItemAt(pos) ));
Now I wish to use a for loop over the number of "keys" in the
arraycollection (should loop 2-3 times)
-- then get the name of each key
-- then pass that name to another function that does cool stuff
Any ideas?
Corey Osman
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------