Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataEnvironment Class problem
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00784061
Message ID:
00784272
Views:
19
>I have a problem with DataEnvironment class.
>I have made aForm class with CDELoader member object on it with Init method which contains code for creating DataEnvironment class which I have created in separate .PRG program. I have put in DataEnvironment class OpenTables() method in Init method of that DE class.
>I have made a subclass of aForm class – cForm class. In cForm class I have added some textboxes with control sources which tables are defined in DE class.
>When I try to CREATEOBJECT(“cForm”) I get message “Error instantiating the object”. When I remove control sources from textboxes everything is OK.
>So I have get to this conclusion: instance of DE class is made after textboxes, and that is why control sources couldn’t pass. OpenTables() do open tables but, as it appears, too late.
>
>Why is this happening, and how can I solve this problem?

If you are in VFP8, set the Forms BindControls to False in the class, open the tables, then set the BindControls to True.

OR

Move the opentables to the Forms Load event.
Tracy
Previous
Reply
Map
View

Click here to load this message in the networking platform