General information
Category:
Forms & Form designer
Mark,
I think I got it, thanks. I was instaniating the child form by calling a method
in the Application Object which as you pointed out had the VFP global datasession. Although I made the method call from within the parent form which has a private datasession, the child did not inherit the data environment from the parent form. Instead the child form which had the default datasession got the global datasession within which the application object was created much
early in the application.
Thanks again.
Kam.
>>Your child form using a Default DS will inherit the DS in which it was >>created in. So if you are issuing a CreateObject while in the Parent form, >>that new form should inherit that Parent form's DS. It should not matter what >>class lib is used when creating the form.
>Mark,
>
>So that explained why I got that form behavior with regard to data session
>because I instantiated the child form by using CreateObject on form base class
>instead of using DO FORM command, right?
>
>Kam.
>
>>The one situation where this will not happen is if the parent form launches a >child form with a goApp.DoForm('mychildform'). This child form that is set to >use the default datasession will inherit the datasession in which the goApp >object was instanciated [probaby the VFP DS -- DS #1].
>
>>For the child form to inherit the parent DS, you have to DO FORM MYCHILDFORM >directly from the parent form.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only