Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Bug, who's seen it?
Message
From
15/12/1999 21:11:06
 
 
To
15/12/1999 17:06:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00304389
Message ID:
00304481
Views:
29
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform