Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Substitution with THIS.Property
Message
 
 
To
20/07/2000 22:28:46
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00395115
Message ID:
00395381
Views:
10
>>How can I use the & macro sub command using a value of THIS.Property....the macro stops processing when it encounters the period after THIS.....Thanks in advance....
>
>Peter,
>
>Here's some code from Barbara Peisch's txtSearch class:
>
>lGrid = THIS.grdName
>
>THISFORM.LOCKSCREEN = .T.
>IF NOT EMPTY(THIS.grdName)
> THIS.PARENT.&lGrid..SETFOCUS() && Extra dot ends the & expression
>



Hi Cindy,

Don't tempt me please :)
lGrid = THIS.grdName

THISFORM.LOCKSCREEN = .T.
IF NOT EMPTY(lGrid)
   local lObject
   lObject=evaluate('THIS.PARENT.'+lGrid)
   lObject.SetFocus()

> THIS.PARENT.&lGrid..SETFOCUS() && Extra dot ends the & expression
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform