Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Here's an easy one...
Message
From
20/06/2001 19:25:07
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00521589
Message ID:
00521716
Views:
17
Nick, Roi,

You're both right. It's just that I seems to remember from the mists of time, when I was doing C++ programming, that a member object which contained an object pointer could be used to call a method of the object pointed, in exactly the way I described, i.e.


this.GetEventHandler.DoSomeMethod()


Where GetEventHandler() is a method which return a reference (pointer in C++) to an object possessing a DoSomeMethod() method. Putting the reference into a variable, and then calling the method from the variable obviously works :


loEH = this.GetEventHandler()
loEH.DoSomeMethod()


But what I was really looking for was something a little more elegant, which I seem to remember doing all the time in C++ (could be Alzeimer's, of course). It evidently doesn't exist in VFP syntax (suggestion for VFP 8, anyone?).
All this is a bit clumsy to recode, since my object has over 100 of these methods, which will need to be re-hand-coded - about 4 hours work, with tests. That'll teach me to be so cocky ...

Regards,
Neil
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform