Hm. Good point, and something I should go away and test. :-) I had it in my head somewhere that Flash did a low-level crude equality check on objects with == - are they both the same type and do the properties match? But I may well have misremembered that as a feature of a different language - I do seem to be switching between different languages for different tasks a lot these days. :-)
Cheers, Ian On 1/23/06, Andreas Weber <[EMAIL PROTECTED] > wrote: > > > shouldn't there be a === or !== in there somewhere to make > > sure you're talking about _exactly_ the same object rather > > than one which just has the same value..? > Good question... > In my understanding - i.e. please correct me if I'm wrong! - when > testing objects for equality the simple and the strict equality operator > are completely interchangeable. > > We are not comparing values, which can be of different types (and thus > provoke 'false positives' with the simple equality operator), but > references, which have a simple, 'binary' quality: either they do point > at the same place in memory or they don't. > And two objects - by definition? - always occupy two distinct locations > in memory, completely independent of wether they are of the same type > and contain the same values. > > trace({} == {});// output: false > > That's why I think that when testing objects for equality, the simple > and the strict oprator will always return the same result. > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders