>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.