Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BINDEVENT() and parameters
Message
 
 
À
04/05/2003 17:48:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00784704
Message ID:
00784743
Vues:
13
>>Hi Jim,
>>
>>I guess you missed following part of the BINDEVENT() help: "The delegate method must have the same parameters as the event specified in cEvent". If your events have 3 parameters and in the same order as in CustomMethodOfClass method, than you can bind them.
>
>Actually no, I didn't miss it, I just didn't understand it.
>
>Some of these (single) method calls are in UpClick and DownClick events, which themselves have no paramaters.
>Others are in MouseWheel or MouseUp, which have different parameters.
>
>So I was looking to learn how I could use BINDEVENT() in the case cited, and it appears that I can't DIRECTLY.
>
>I simply wanted to have one place to go create/MAINTAIN the actual method calls rather than having to visit EVERY pertinent object's relevant events where they are needed as it is easy to overlook one (or more) doing it the individual way.

You still can do it by creating intermediate method with enough parameters to bind to all the events you need. In that method you can use AEVENTS( ArrayName, 0) to determine the caller and process parameters accordingly, if necessary, and than call CustomMethodOfClass method.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform