Object equality test requires use of id value
I was writing code that needed to determine whether two TextFrame objects appeared on the same page, and noticed this bit of strangeness:
If I use the following code:
if (thisTextFrame.FrameParent == thatTextFrame.FrameParent) {...}
the expression always evaluates to false. However, if instead of comparing the objects themselves, I compare their id properties:
if (thisTextFrame.FrameParent.id == thatTextFrame.FrameParent.id) {...}
the expression produces accurate results. After some testing, it seems the same behavior occurs when any FM object referenced by two variables is compared to itself.
Everywhere else in ExtendScript, the use of F_ObjHandleT values has been replaced by direct object references. I have no idea if this exception is a bug or by design, but since I did not see it documented anywhere else, it seemed a good idea to mention it here.
