Maybe somebody else will have one, but I am not seeing a simple way to do this 
in a more sophisticated manner. This leads me to the following question: Are 
you experiencing performance problems? If not, I would suggest coding what 
works, and not worrying about the overhead involved in a somewhat brute force 
approach. If you start encountering performance problems, and identify this 
part of the code as where the problem lies, then it might be worth putting in 
the additional work to develop a more subtle solution.




----- Original Message ----
From: tchredeemed <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, July 17, 2008 1:13:48 PM
Subject: [flexcoders] Re: Comparing two array collections


Just an update, I know I can pass both into a function that does the
following:

checkForEquality( a:AC, b:AC ):Boolean {
if( a.length != b.length ) return false;

loop through each item
if an item differs, return false;

return true;
}

however, I was hoping for a solution with less overhead.

--- In [EMAIL PROTECTED] ups.com, "tchredeemed" <[EMAIL PROTECTED] > wrote:
>
> How would you go about comparing two array collections?
> 
> Each array collection is populated with items of an ADT ("Order", to
> be exact).
> 
> If I do .toString() comparisons, it only appears as different if I add
> or remove an "Order", because the .toString() shows up as "[object
> Order], [object Order], etc.."
> 
> I need to know if I add or remove an order, as well as if an order
> changes...
> 
> Just wondering if there is an easy solution.
>

    


      

Reply via email to