chrisg1979
08-07-2009, 08:54 PM
Hello all,
I'm having trouble when trying to remove XMLList objects from a Dictionary.
The Dictionary needs to be reset to an empty state as each time a certain function is called it checks for the existence of keys.
I've tried the following (the Dictionary is assetsByPage)
for each(var obj:Object in assetsByPage)
{
delete assetsByPage[obj];
}
But I get the error:
TypeError: Error #1119: Delete operator is not supported with operand of type XMLList.
I think I need to delete the key itself, rather than the Object stored by the key, but don't know the syntax for this. Can anyone shed some light on it?
Thanks in advance
I'm having trouble when trying to remove XMLList objects from a Dictionary.
The Dictionary needs to be reset to an empty state as each time a certain function is called it checks for the existence of keys.
I've tried the following (the Dictionary is assetsByPage)
for each(var obj:Object in assetsByPage)
{
delete assetsByPage[obj];
}
But I get the error:
TypeError: Error #1119: Delete operator is not supported with operand of type XMLList.
I think I need to delete the key itself, rather than the Object stored by the key, but don't know the syntax for this. Can anyone shed some light on it?
Thanks in advance