Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a class' parent method from another object's method
Message
De
30/05/1999 20:36:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Calling a class' parent method from another object's method
Divers
Thread ID:
00224571
Message ID:
00224571
Vues:
62
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform