Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BINDEVENT() and parameters
Message
De
09/05/2003 07:46:50
 
 
À
04/05/2003 14:50:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00784704
Message ID:
00786694
Vues:
14
>Suppose that I have several events where the only line of code in them is along the lines of
=This.Parent.CustomMethodOfClass(param1, param2, param3)
Is there any way to use the BINDEVENT() function to eliminate that line of code (assuming that I put the BINDEVENT() calls in the control's Init()?
>
>There is apparently no provision for parameters in the function and the Help is basically mute on the subject except for the tantalizing words "You cannot bind to an event with parameters that are passed by reference.".

I don't see a problem here.
Provided the method that you set as the delegate has enough parameters to receive all that any possible event which triggers it can pass.

When an event happens, what is passed to the delegate is exactly the parameters passed to the event's handler method.

So if your delegate has to handle calling from multiple events with different sets of calling parameters, I'd question the design - but it can be done.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform