Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MemberClass retrofit
Message
De
15/05/2003 14:58:01
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
MemberClass retrofit
Divers
Thread ID:
00788940
Message ID:
00788940
Vues:
81
Hello all-

I recently installed VFP8 for the first time (I know, I know, took me long enough. Well- I've been busy :-))

I was excited to make use of some of the new features, and quickly got to work retrofitting my framework to make use of new functionality. One of the things my grid class does is install custom header classes at runtime from using properties set in the grid at design time. Reading the documentation led me to believe I could remove my custom code to perform this, and now rely on Grid.MemberClass and Column.HeaderClass to dothe work. I went to work changing properties in the grid class, tried the grid out on a new form, and everything worked as expected. Cool!

Went to open an existing form that has an instance of my grid class on it, and get:

Error loading file - record number 5. Header1 (or one of its members). Parent : Object class is invalid for this container

Examining the scx file shows that the record in question is indeed a header object, but its class is 'header' and ClassLoc is empty. Its parent object does indeed point to the column, so the error given doesn't make any sense. The same erro is given even if the Grid.MemberClass is filled out with a custom class, but the custom column does not designate a custom header.

I admit I sort of expected to be disappointed with how VFP handles retrofitting existing grid instances with these new features. I was sort of expecting loss of column and header settings and/or code. But I didn't expect this.

My guess is that this is a bug with the Form designer. Maybe something to do with the order that the designer adds new column objects and removes older ones. If it's not a bug, and this behavior is by design and I just don't understand the underpinning of the grid object, well I think it deserves some documentation.

So I guess I'm looking for two things
1. An explanation as to why this is happening
2. A workaround for retrofitting existing grids with the new features without losing properties and code

Any wisdom for me?
Erik Moore
Clientelligence
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform