Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BindEvent Gotcha - Fires Twice
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01158912
Message ID:
01159575
Vues:
18
Interestingly enough, setting the property storing an object reference to NULL (thisform.LastValue = NULL) still triggers delegate twice.

>I found a strange gotcha in VFP's native BindEvent. It seems that if you bind an event handler to a property (in order to have the hanlder fire when the property changes), it will fire twice if you switch from storing an object reference in the property to a character value. The first time it fires, the value changes to NULL and the second time it changes to the value that you assigned.
>
>I'm posting this as a reference.
>-m@
>
>Example code:
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform