Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms & Inheritance
Message
De
21/04/2000 17:08:50
 
 
À
21/04/2000 16:15:11
Gary Ward
Rms Management, Inc.
Galena, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00362037
Message ID:
00362374
Vues:
15
>Thanks for the response...
>
>I have checked and I have not added code to the subclassed form, the method name is there, whenever I run the form it does not find the code... Below, I have tried to be more specific...
>
>The following is the relationship among the form/classes in question… I have a form class called 'frm' and a subclass to 'frm' is 'frmmaint' my form is called 'empl' and is based on the class 'frmmaint'. I added a method called 'AddFormNameToMenu' to the 'frm' class, and when I run my form 'empl' I receive the error message 'File AddFormNameToMenu.prg does not exist'. If I understand inheritance correctly, this method should be available in my form 'empl'. When I view the form properties for 'empl' I see the method 'AddFormNameToMenu' with the word 'Default'. I understand with the word 'default' by the method name means the form will use the code in the parent form. I have not added code to the method in my form. I have used the class browser to browse the class and confirmed the relationships between the forms. Which is... 'frm' is the parent class, 'frmmaint' is a subclass of 'frm' and my form called 'empl' is created on the class 'frmmaint'.
>
>In an effort to debug this problem, I created another sub-class to frm called 'frmmaint2' and created a form based on 'frmmaint2' and the method is in the new form and works. I just can not determine why the form based on 'frmmaint', my production class, does not find the method. Could there be some kind of corruption that is causing the problem? If so, can it be repaired? If I had committed months of work and various forms were created I would not want to start over.
>

Please excuse me for the probably dumb questions, but they're the only things I can think of:

(1) When you call AddFormNameToMenu in empl, did you prefix it with 'thisform.', to tell it that you're calling a method?

(2) Did you make AddFormNameToMenu Hidden in frmmaint? Hidden methods and subclasses do not inherit upwards.

(3) Typo?

I'm out of suggestions - the first is the obvious one.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform