Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BINDEVENT() (and related) - best placement of code?
Message
De
26/04/2003 19:24:32
 
 
À
25/04/2003 10:02:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00781200
Message ID:
00781892
Vues:
20
>>>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.
>>
>>By outside of classes do you mean in a procedural PRG? In this context, every line of application code should be in a class.
>
>Sorry, no, I mean outside VCXs or actual class code. In other words, I mean that BINDEVENT() should only be coded in method/event code of instantiated objects.

Not necessarily, Jim. Imagine a control that has code in, say, Init to bind some of its methods to the containing form or other container. I sat in a session Drew gave today at EssentialFox where he showed that using BindEvents(), and one whole group of examples included control classes which bound certain events to form-level stuff. The obvious is a custom resize method that binds itself to the form.resize.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform