It isn’t clear how you made your temp copy. Maybe you just have another reference?
the original arraycollection (on the parentapplication) is created as such:
public var fiscalYrsArray:ArrayCollection;
the data in that array is added as in my code above in the fiscalYrs_resultHandler function
then on a separate component called by the parentApp I create the temp arraycollection like this:
[Bindable]private var fiscalYrDP:ArrayCollection = new ArrayCollection;
And then in the init function which runs on the initialization of the child window i set the temp array = to the original like this:
fiscalYrDP = parentApplication.fiscalYrsArray;
ps forgive the christmas colored text... i copied and pasted and couldn't change the color on a response!
By assigning the array using "=" you are just assigning it to the same array - in same memory location.
If you want to maintain a separate array you need to use the ObjectUtil.copy function
import mx.utils.ObjectUtil; arrNewData = new ArrayCollection(); arrOldData = ObjectUtil.copy(arrNewData) as ArrayCollection;
Don THANK YOU! That was the perfect solution and everything is working now.
Glad it worked out for you - you must have been able to fix my obvious typo?
Didn't realize it until I just looked at it now.
It should have read
import mx.utils.ObjectUtil; arrNewData = new ArrayCollection(); arrNewData = ObjectUtil.copy(arrOldData) as ArrayCollection;