Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BINDEVENT Gotcha!
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
BINDEVENT Gotcha!
Divers
Thread ID:
00823477
Message ID:
00823477
Vues:
70
This message has been marked as the solution to the initial question of the thread.
In case you missed it in another thread here today, there is a Gotcha in using a BINDEVENT for an event where VFP passes parameters to. Take the MouseMove event for example. Edit the MouseMove, and you see a parameter statement:

LPARAMETERS nButton, nShift, nXCoord, nYCoord

So, when you BINDEVENT any event to which VFP passes parameters, the delegate method or procedure needs to lead with a parameter statement with the same number of parameters. So the MyMouseMove code in the BINDEVENT example below must have a parameter statement in order to avoid an error:
BINDEVENT(THIS, 'MouseMove', THISFORM, 'MyMouseMove')
BTW, this is documented in the VFP Help CHM file.
Mark McCasland
Midlothian, TX USA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform