Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DLL Question
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00262172
Message ID:
00262448
Views:
10
>Your idea of using properties of the object and binding them
>to the form objects is interesting.
>
>If I bound the form objects in the property sheet at design
>time, then set up the DLL in the init, won't that error out
>when the form's objects try to init?

The trick here is that the COM must be instanciated before the controls. You can do that by dropping the COM on your form (go to Tools|Options|Controls, select ActiveX controls and check your COM. In the form toolbar, select ActiveX Controls and drop the COM on your form). Now, click on your COM and select Format|Send to Back to make sure that it will be the first object instanciated on your form.

>Also, how would you do this for multiple tables?

You mean a parent-child relationship? Were you show the childs in a grid? In that case, you would either have a method that fetch the next child for a given parent or transfer the children via ADO.

>And even more,would you consider trying to automatically add
>the properties to the data object during it's init - that way
>if the structure changes you dont have to go back in and modify it?

>When to object is initialized, during run time, you could loop through
>the fields and add a property for each field.

That is a very good idea. I would create a property for the name of the table to read. The Init() would open the table specified in this property and create a property for each field of the table.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform