[flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-11-30 Thread ben.clinkinbeard
> it only copies over object values, not exact values. Huh? --- In flexcoders@yahoogroups.com, "polestar11" <[EMAIL PROTECTED]> wrote: > > Hi there > > Does anyone know how to iterate through an Object / Dictionary & copy > child items. > > I've tried ObjectUtil, but it only copies over object

[flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-11-30 Thread polestar11
--- In flexcoders@yahoogroups.com, "ben.clinkinbeard" <[EMAIL PROTECTED]> wrote: > > > it only copies over object values, not exact values. > > Huh? > > @Tom How would one bind the keys to the new dictionary children? var newDict:Dictionary = new Dictionary(); var item:Class for each(item in my

[flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-12-08 Thread polestar11
Hi Tom That wouldn't work because item is the assigned object in the dictionary not the key, so what you would actually be saying is: newDict[item]=myDict[item], where item would be the key reference in newDict, while myDic[item] is undefined. I eventually gave up trying to iterate through a dict

[flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-12-12 Thread slangeberg
You want a for..in loop, NOT for...each: var newDict:Dictionary = new Dictionary(); var item:Object; //don't think you want Class type, here.. for (item in myDictionary) { //now perform the deep copy... //for which you may need to have the class def... newDict[item] = ObjectUtil.copy(m

RE: [flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-11-30 Thread Peter Farland
--Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polestar11 Sent: Friday, November 30, 2007 10:31 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Actionscript: Copy an Object or Dictionary --- In flexcoders@yahoogroups.com, "ben.clinki

Re: [flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-11-30 Thread Douglas Knudsen
take a look at http://www.darronschall.com/weblog/archives/000271.cfm You can use ObjectUtil.copy() and retain types DK On Nov 30, 2007 10:30 AM, polestar11 <[EMAIL PROTECTED]> wrote: > --- In flexcoders@yahoogroups.com , " > ben.clinkinbeard" > > <[EMAIL PROTECTED]> wrote: > > > > > it only

Re: [flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-12-03 Thread Tom Chiverton
On Friday 30 Nov 2007, polestar11 wrote: > for each(item in myDictionary) { > newDict[?] = item; > } newDict[item]=myDict[item]; -- Tom Chiverton Helping to continually reinvent essential channels on: http://thefalken.livejournal.com Please