Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Substitution with THIS.Property
Message
From
21/07/2000 11:37:37
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:
00395471
Views:
12
Nadya,

Please note ">>Here's some code from Barbara Peisch's txtSearch class:"

This is Barbara's code, not what I did with the code when I "re-arranged" it to my liking.

Sometimes code like this has been in use for several versions without being revised to take new features into account. Not everyone uses the latest version. Some code is written in the most clear and obvious way for easy reading rather than fast or efficient execution. Not everyone has time to go back and re-work old code that works. Barbara may or may not drop in here to explain herself, and she may not feel that she needs to.

I do know that some MVP's were glad to have the blue envelopes removed so people were not always after them to be "perfect" since they were the so-called experts. I don't know whether Barbara was in this category.

I worked on one project in the past where the stated goal was that a beginning programmer was to be able to maintain it. I could think of thousands of ways to "improve" it but that was not the goal I was told to operate under. Needless to say I didn't want to stay there long because that project did little to develop my skills.




>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform