Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The WHEN event.... a cheater?
Message
De
30/03/2001 16:19:09
David Brunelle
Université de Sherbrooke
Sherbrooke, Québec, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
The WHEN event.... a cheater?
Divers
Thread ID:
00490451
Message ID:
00490451
Vues:
40
Ok. It's not really a question.. it's rather something I found out while debugging... When you look at the MSDN library, it tells you that the WHEN event happend as soon as you try to get the focus, and then the gotfocus event happen.. But according to what I just experienced, THIS IS WRONG, at least for the buttons I was using. It seem that the gotfocus event happen first, then the click, AND THEN the When event..
(Note : I am doing the maintenance of the system, so that was already there without my knowledge... It actually was in a class so I couldn't see it immediatly that there was something in there.. Imagine the time it took me to find why it wasn't working)
How I found this out..? Well, I needed to have a certain condition before clicking on the button... and it was coded in the WHEN event of the buttons, after hours of testing, I ended up in the When event AFTER the click event. When I looked at the code, I knew that this was needed before clicking, and that if it was AFTER. it would mess everything. So I put the code in the gotfocus event and Voilà (I know.. I shouldn't use french in here -) ) . It's working now, but I am writing this so that maybe if some people are having problem that this would help them...
Any comment...?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform