Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVALUATE and macro substitution alternatives
Message
From
28/06/2000 14:46:28
 
 
To
28/06/2000 14:38:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00385373
Message ID:
00385973
Views:
23
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform