>>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