Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclass method disappears when parent method name chang
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00148378
Message ID:
00148407
Vues:
31
Hi Mark,

>Try this, just to see if I'm losing my marbles:
>
>1. Open a parent class and add a method. Just call the method asdf and put a single * in for its code. Close the class.
>
>2. Open a child of that parent and put a single * in for asdf's code. Close the class.
>
>3. Open the parent class and rename the method via the Edit Property/Method dialog. Close the class.
>
>4. Open the child class. The asdf method has disappeared.
>
>The code is actually still in the VCX, as Scctext shows. But it's inaccessible through ordinary means.
>
>If my test isn't just some sort of weird fluke, this means that extreme caution is required when changing a method name!

That's actually by design. In VFP the child class does only know the name of the method, nothing else. There's no ID telling a method what method it is. And the parent class has no link to the child class, only the child class a link to the parent class.

If you rename a method in a parent class VFP has no possibility to detect a renamed method later. This would require that every method has a GUID, but I doubt MS implements such thing.

Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform