Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems on Grid with MemberClass
Message
From
04/11/2003 13:51:00
 
 
To
04/11/2003 11:52:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00845710
Message ID:
00846110
Views:
24
Hi Nancy,

I open this new thread because if i see a interest for this, i have
other complex problem with grid.

My result code ( _cliptext value ) with
<---- my comment ( CD is Class Designer and OE is object engine ):
 1. Create a baseGrid subclass, with MemberClass column cl
 Now save this 

 2. Now reopen the grid, and rename the column
 Column Name  Cl1  is RENAMED to MyNameColonna     <--- this is a normal operation
 Header Caption is not (none). It have a ASCII 2   
<--- 1) this is a CD little bug: superClass Header Caption is empty
 Header Name is free.
 I rename Header to hdRenamed
<--- 2) this is a CD little bug: Name of a superclass component must to be R/O
<--- MASTER PROBLEM : why OE have add a Text1 control on column ???
<--- VFP has had too much initiative here.
 Now save this 

 3. Now TRY to reopen the grid with column renamed
Error loading file - record number 3.  Text1 <or one of its members>.  Parent : Cannot add this object to a Grid
<--- 3) this is OE big bug: OE load the MemberClass column and ignore
<---    specific MyNameColonna, then name still Cl1;
<---   on VCX record for Text1 definition, CD have put on field Parent 
<---   < baseGrid.MyNameColonna >, then it cannot found this column.
 Now rollback the problem, writing on VCX Table.

 4. Now reopen the grid with column name rollback
 Column new Name is lost. It return to Cl1
 Now remove text1 column control and rename the column
 Column new Name is MyNameColonna 
 Header Caption is correct to (none).
<--- this is strange, if column haven't cell control, header Caption
<--- is correct.
 Header Name return to correct name.
<--- < hdRenamed > is lost, original hd is apply
<--- the reason of this fact derives from an other problem ( next post )
 Now save this 

 5. Now reopen the grid with column renamed
 SubClass is reopen because Text1 parent reference is correct with the column standard name Cl1
<---  this is my error on copy/paste code it is part of 4. point
<---  However is impossible change the column name !!!
<---  A workaround exist ( next post )
 Columns have 1 controls
 VFP not use renamed column, but reapply standard column name
 Then class definition is stable :
 - Column name is forced to standard name
 - Header caption is correct
 - Column have only header control.
<--- i want use this config as baseGrid, on subclass i can put various
<--- control on this column 
<--- ( IF I DEFINE A COMPLETE COLUMN, ALL COLUMNS ON GRID ARE EQUAL )

 6. Now build a subclass of this subclass, and want put a EditBox as Cell column Control
 This SubClass of BaseGrid have on Column Cl1 2 controls !
 Class designer have added a new Text1  control
<--- This is the MASTER BUG on MemberClass.
<--- if i load a column without cell control, when i subclass the grid
<--- OE add a Text1. The initiative of VFP work.
 Header Caption is (none).
<---  This because at load time Column haven't cell controls.
 Now remove Text1 and add a EditBox
<--- It begins the fight!
 Now save this 

 7.1 Now reopen the subBaseGrid
 Now SubClass subBaseGrid have on Column Cl1  3 controls !
 Class designer have add another Text1  control
<--- The initiative of VFP continue to work.
<--- I have lost the battle.
 Header Caption is not (none). It have a ASCII 2
<---  This because at load time Column have cell controls.
 Now save this 

 7.2 Now reopen the subBaseGrid
 Now SubClass subBaseGrid have on Column Cl1  4 controls !
 Class designer have add another Text1  control
<--- The initiative of VFP continue to work.
 Header Caption is not (none). It have a ASCII 2
 .....
 This continue until a overflow occur.

 The error is on MemberClass loader, it see empty column on BaseGrid,
 then add a Text1, ignoring ControlCount on current subBaseClass column
<--- this is a comment

<--- Next is for show another two bugs.

 8. Now reopen baseGrid, and change Header FontName
 LockColumns is set to  1
 Header FontName  Microsoft Sans Serif  is set to Batang
 Now save this 

 9. Now reopen the subBaseGrid
 LockColumns is  0 . Inheritance is not apply
<---- i aspect 1
<---- this is a OE ineritance bug.
<---- Workaround ( it is good only for static superclass )
<---- is reset to default and fix it
 Header FontName is  Microsoft Sans Serif . Inheritance is not apply
<---- i aspect Batang
<---- this is a CD ineritance redefinition.
<---- CD redefine deafault superclass values 
<---- ( also other: Alignment, FontSize ... )
<---- Workaround ( only beginning from a subclasse that it does not have
<----- redefined MemberClass ) is to Reset to default all 
<----- column/header/cellcontrols elements. 
<----- I write a support code for this.
Header Caption is not empty. It have a ASCII 2
Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform