Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Bug, who's seen it?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00304389
Message ID:
00306785
Vues:
31
>Hi Mike,
>
>>Here's one for VFP 6 SP3:
>
>Yep, I reported that one in November 1998. The problem is that it's not clear whether it is a bug, or not. WITH...ENDWITH is a shortcut. The object reference is evaluated properly via the Access methods, but then VFP stores this pointer internally. Any further access is done via this internal pointer and without resolving the object reference again.
>
>On the one hand, this behavior is what makes WITH...ENDWITH so fast, on the other hand it rendes the THIS_ACCESS method almost useless, especially if you return different object references from this method, because you can hardly guarantee that the object is never accesses within a WITH construct, especially not when your generic code or a framework is involved.
>
>Christof

Thanks, Christof. That explains the problem I was having with a "dangling object" reference I had when used with a WITH/ENDWITH. Removing the use of the WITH/ENDWITH and spelling out the reference in it's entirety made the problem go away. At least now I know why!
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform