>Hi Erik.
>
>>Apparently, when a local object is referenced with a WITH/ENDWITH, and the routine exits, the code in the destroy method of the referenced object "erases" the ruturn value of the routine, replacing it with the default, .T..
>
>In addition to this problem, in VFP 5, the object won't get released since VFP is holding an internal object reference to it via WITH. This may have been fixed in VFP 6 -- since I fixed the code where I discovered that problem, I haven't see it since.
>
>Doug
This is fixed in VFP 6. But VFP still holds on to the object until the routine exits, even if you issue a RELEASE on the referencing variable. I guess this behavior is actually desirable, since anything within the WITH/ENDWITH should be able to see the object with just a .PropName.
Erik Moore
Clientelligence