Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP not recognizing an object name when called upon
Message
 
À
07/04/1999 18:48:19
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00206282
Message ID:
00206376
Vues:
19
>HI!
>I have a form class which is called from the main form. This form class has a procedure where it calls few procedures which are methods of the main form. For some reason VFP sometimes doesn't recognize the name of main form, by which a method is referenced, and sometimes it does. I don't know what I should do at this point to make VFP work properly. I will appreciate a response from anyone.

In addition to what Edward said, for cases (such as the way I use a top-level to control many child forms and the child forms use many top-level PEMs) you can create parent form property(s) so that parents and children can always communicate. An simple example:

Create custom property: Parent.child1 = .NULL.

Now launch child1 from parent:

DO FORM child1 NAME thisform.child1
or thisform.child1 = Createobject('childformclass')

Child1 now refers to parent method, for example, as Parent.Mymethod()

Child2 now refers to child1 method, for example, as Parent.Child1.Somemethod()

An array is good for collecting many child forms...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform