>Here's one for VFP 6 SP3:
>
Doing object stuff inside a WITH/ENDWITH can cause some funky things to happen. I recently spent an hour or so debugging a routine that was supposed to be returning .F., but was returning .T.. If I stepped through the code in the debugger, I could actually watch the routine return .F., but the calling procedure received a .T..
Turns out it was because I had exited the routine from within a WITH/ENDWITH for an object created with CREATEOBJECT. That object had some code in the destroy event, and the routine was returning the results of the destroy event because destroy was running between the time that I RETURNed (and the object went out of scope), and when the calling routine received the results. Wierd.
Erik Moore
Clientelligence