Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use THIS or THISFORM in Form?
Message
De
14/11/2002 12:02:00
 
 
À
14/11/2002 11:55:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00722754
Message ID:
00722758
Vues:
15
About the only advantage to 'This' over 'ThisForm' in this instance that I can see would show up if you wanted to move it all to a class. If you did that, then 'ThisForm' would be an error.

On the other hand, if you wanted to move the code to another object on the form, the reverse would be true. In general, I feel like 'This' is more portable, so I like it better for that reason. If you aren't considering portability, then I don't see that it makes any difference.

Alan

>When building new forms, I found myself repeating calls to business objects dropped on the form. About half of the calls were This.Bizobj.Somefunction() and the other half Thisform.Bizobj.Somefunction().
>
>In this instance, THIS and THISFORM were the same, so I'm wondering which would be the better to use, and why. Neither Help or HackFox 7 shed any light on this thought.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform