Information générale
Catégorie:
Codage, syntaxe et commandes
>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
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