Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BINDEVENT() (and related) - best placement of code?
Message
De
24/04/2003 13:06:01
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
BINDEVENT() (and related) - best placement of code?
Divers
Thread ID:
00781200
Message ID:
00781200
Vues:
50
The new event binding features look like they will be very useful.
After a little bit of playing with them in dinky tests I think I understand how they operate and when I might use them.
The big outstanding question that I have is: Where should they be coded?... Is there some optimal place(s) to put the code to make their existence/usage evident to future code readers? I can see usage being worse than "spaghetti code" if I am not careful about it.

My answer to when it should be useful is: in the general case, outside of classes, with perhaps some empty methods coded within classes to facilitate usage of BINDEVENT() externally. And I don't think that RAISEEVENT() has any place within class code at all. Does this make sense or is it cutting off valuable potential uses?

But I can't settle on a good answer for where the code should go, and maybe there is no ideal place.
I'm inclined to say that Form Init() is the logical place for BINDEVENT() code. But what of the case where one might want to dynamically BIND/UNBIND an event? Should there be some 'standard' for such usage, and if so, where?

Opinions?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform