Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a class' parent method from another object's met
Message
From
31/05/1999 12:30:26
 
 
To
30/05/1999 20:36:32
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00224571
Message ID:
00224685
Views:
16
>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... it sounds like you need to factor out the methods in the 'other object' so that you won't need to call the parents method.. since, I don't think you can do this.

BOb

If you have Design Patterns check out the template pattern.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform