Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EVALUATE and macro substitution alternatives
Message
De
28/06/2000 14:46:28
 
 
À
28/06/2000 14:38:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00385373
Message ID:
00385973
Vues:
24
>However, I find I don't use EVALUATE all that often. Macros give much more flexibility -- and at a performance hit which in most cases isn't noticed.

I like Evaluate() to create object refrences for me:

thisform.addobject(lcVar, 'label')
loControl = eval('thisform.' + lcVar)
loCOntrol.Caption = lcVar
loControl.VIsible = .T.


Instead of the & way which would be:

thisform.addobject(lcVar, 'label')
thisform.&lcVar..Caption = lcVar
thisform.&lcVar..Visible = .T.


To many of those will slow you down and it jsut looks brutal! I think you can do the same thing with Alias.Field combinations where the alias or the field is stored in a variable.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform