Versions des environnements
Network:
Windows 2003 Server
>Hi all,
>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.
>
You get double event to compensate for the fact that an event handler binded to Destroy event of a form does not fire if the event code of the form is empty. If you put at least a comment line, it fires.
This way, the math adds up right: 2 events fired + 0 events fired = 2 bindevents. Pure logic.
Carlos
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement