Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need macro substition help
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00832634
Message ID:
00832667
Views:
17
Ahh... Ok. I was thinking it used the dot at the end where the double dot was. Thank you!

>Joe,
>
>The first '.' in '&this.' ends macro substitution and generates an error because 'this' is an object not a string. You can get a property value this way
m.eventhours = EVAL("this.parent.parent." + this.parent.parent.priorday + ".eventhours")
>
>>I agree that the dot marks the end of the substition, but shouldn't the addtional property "eventhours" still be tacked on the end they way I did it?
>>
>>>Joe,
>>>
>>>The '.' (dot) marks the end of macro substitution. Try
loPrevDay = EVAL("this.parent.parent." + this.parent.parent.priorday)
>>>
>>>>I'm working on a calendar class in vfp7. It's a container with child containers that act as days. User click a day container to insert an event. If they click a different day after one has been clicked already the event is moved. So I needed a way to reference the prior day clicked. I did this by storing the control name clicked in a property called "priorday" on the calendar class.
>>>>
>>>>this.parent.parent.priorday would be set to "Day4" for example. Now when I want to reference the prior day when control "Day5" was clicked I could do something like this.parent.parent.&this.parent.parent.priorday..eventhours.
>>>>However this doesn't work and I'm not sure why. Any tips?
Previous
Reply
Map
View

Click here to load this message in the networking platform