[Flashcoders] removing a entry from an associative array?

2005-11-09 Thread David Skoglund
The only solution I see is to create a new array by looping through the array like this: function removeAssociativeEntry (startArray, entryName) { newarray=[]; for (var i in StartArray) { if (entryNamei) { newarray [i]=startArray[i]; } } return

Re: [Flashcoders] removing a entry from an associative array?

2005-11-09 Thread David Skoglund
: Wednesday, November 09, 2005 3:50 PM Subject: [Flashcoders] removing a entry from an associative array? The only solution I see is to create a new array by looping through the array like this: function removeAssociativeEntry (startArray, entryName) { newarray=[]; for (var i

Re: [Flashcoders] removing a entry from an associative array?

2005-11-09 Thread Andreas Rønning
@chattyfig.figleaf.com Sent: Wednesday, November 09, 2005 4:14 PM Subject: Re: [Flashcoders] removing a entry from an associative array? delete?? function removeAssociativeEntry (startArray, entryName) { delete startArray[entryName]; } regards, Muzak - Original Message - From: David Skoglund [EMAIL

Re: [Flashcoders] removing a entry from an associative array?

2005-11-09 Thread JesterXL
] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 09, 2005 4:14 PM Subject: Re: [Flashcoders] removing a entry from an associative array? delete?? function removeAssociativeEntry (startArray, entryName) { delete startArray[entryName]; } regards, Muzak

Re: [Flashcoders] removing a entry from an associative array?

2005-11-09 Thread Nils Millahn
well - if it's an associative array, then the name of the element is its index, so that answers your second question. And if you set the element to undefined, you will get the same result as the loop you are doing... startArray[entryName] = undefined; (also, perhaps your code works but I'm