Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a class' parent method from another object's method
Message
From
30/05/1999 20:36:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Calling a class' parent method from another object's method
Miscellaneous
Thread ID:
00224571
Message ID:
00224571
Views:
61
Not sure exactly how to describe this problem, but let me try. My form class has a method called MarkDeleted(). Originally, the method in the instantiated form did some stuff, then did a DODEFAULT(), then did some more stuff.

I'm changing it to have it call a "method in another object" on the form, but it still needs to call the parent MarkDeleted() method. However, where the parent MarkDeleted() really needs to be called is from within the "method in the other object" (since I need to do stuff before and after calling the parent MarkDeleted())

Like I said, a little hard to explain, but I hope people get what I mean. How can I do this? I thought about the old scope resolution operator (::), but it doesn't work, which I didn't really think it would (unless I did something wrong).

Anyway, the only way I could think of to handle this was to have two calls to the "method in the other object" and a DODEFAULT() in between. It'll work, but not elegant. Any suggestions?

TIA,
Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Next
Reply
Map
View

Click here to load this message in the networking platform