Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid subclassing question
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00665694
Message ID:
00666344
Views:
14
Hello Jon,

I suppose you get the message 'Member Object does not exist' when editing your derived grid classes.

This is because there is a referential problem in the subclass grid definitions. To fix it, you can hack the vcx directly.

Make sure you take a backup first, then take the following steps:

1. After you have added your sixth column to Grid A, edit the vcx as a table: USE myvcx.vcx &&( include the vcx extension.)
2. Find the record that defines you derived grid class eg LOCATE FOR CLASS = 'grida' and objname = 'gridb'.
3. Once found, browse the table and find the field 'reserved2'. There will be a number in here which is the number of columns that you have added * two. Decrement this number by two.
4. Delete the next two rows in the table.
5. Close the table and recompile your classlib. COMP CLASS myclass.vcx.
6. You should now be able to edit your grids with the visual editor.

Hope this helps.

Mace

>Here's the problem:
>
>Consider 3 grid classes - A,B,C. A is our parent class with 5 columns defined on it. B inherits from A and has one extra column. C also inherits from A with two extra columns on it. What we would like to do is add a column to class A and have the other two classes inherit the new column since it will be a column that would be used for all of our grids.
>
>We're finding that this simple inheritance after the fact doesn't work - probably because the children have already overridden the grid. Does anyone know of a simple way to achieve what we're after without having to redo all the work in the children classes? Maybe even a VCX hack?
>
>Laterness,
>Jon
Previous
Reply
Map
View

Click here to load this message in the networking platform