Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
>>One tiny thing however. I don't agree with Fabio about the use of 'm.this.Value'. It should be 'this.value', so without the mdot. The mdot is complicating things here and does not add quality to the code. Fabio, you are giving a bad example and the risk is that it may become widespread to even specify the mdot when refering to this, thisform and the like. I know you can prove that 'this' could also be the name of a field, but that's really too academic.
>
>In view of some recent discussions about speed, I did some speed tests, both with ThisForm... and with m.ThisForm... the theory being that VFP might search for a fieldname first, if the m. is omitted.
>
>When trying to actually access a field named "This", it seems that VFP indeed finds the fieldname. So, it seems that Fabio is right, in principle.
>
>On the other hand, with a cursor having 10 fields, I found no significant speed difference in a tight loop. And that is about the only issue that would worry me, since I don't plan calling a field "This" or "ThisForm".
The issue is for Alias, not for a Field.
When you write this.xxxx VFP search for a Alias=='this'
into the current datasession.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement