Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataenvironment
Message
From
07/04/1998 11:12:39
Alex Zhadanov
Computer Generated Solutions
New York City, New York, United States
 
 
To
07/04/1998 10:40:34
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00090121
Message ID:
00090165
Views:
23
>>>>>>>Hi All!
>>>>>>>I have such novice question:
>>>>>>>I have form class and I use CREATEOBJECT to create instance of the
>>>>>>>form. But I want to have dataenvironment in this form. I know that
>>>>>>>class does not have dataenvironment. How can i create form object
>>>>>>>and keep dataenvironment ?
>>>>>>>Thank you Alex
>>>>>>
>>>>>
>>>>>Sorry, I made wrong reply. Actually you should add custom class property 'oDE' and then:
>>>>>oForm=createobject("frmClass")
>>>>>oForm.oDE=createobject("dataenvironment")
>>>>>oForm.oDE.addobject("cursor1","cursor")
>>>>>etc.
>>>>Thank you for prompt reply.
>>>>It means after creating dataenvironment in the class property 'oDE' and all cursors i need programmaticly fill all properties of these objects and call it's methods also from my program. Is it right ?
>>>>Alex
>>>
>>>Yes. However, you can prepare your own DataEnvironment class and instanciate oDE from there getting all properties/methods at once.
>>Thank you Edward. I think what is better to create form from form class with
>>CREATEOBJECT and than create dataenvironment like you showed or create form from
>> form template (using form class as template) with already ready dataenvironment and call this form with DO FORM?
>
>I think CREATEOBJECT way is more OO. Actually, I don't have this dilemma because my framework doesn't require to have separate DE for each form.

Thank you for all replies.
Edward. Do you use private data session for each form or all your forms share the same default data session ?

Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform