Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Substitution with THIS.Property
Message
 
 
À
20/07/2000 22:28:46
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00395115
Message ID:
00395381
Vues:
11
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform