Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP not recognizing an object name when called upon
Message
 
To
07/04/1999 18:48:19
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00206282
Message ID:
00206376
Views:
20
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform