Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug: Using headerclass and memberclass
Message
De
12/01/2006 20:04:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Bug: Using headerclass and memberclass
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01086398
Message ID:
01086398
Vues:
74
In the process of changing from VFP 8.0 to 9.0sp1, we found the following issue.

Basically in VFP 9sp1 we can not open any forms (scx) we created in VFP 8 that contains a grid that has memberclass with a headerclass if that grid had defined columns. Ie. Columncount greater than 0. We do not see the same issue with the forms that had the same grid and column/header definitions but a colunm count of 0 or less. And yes, we did recomplile the prg that contained the member/headerclass defs. The same exact forms continue to open just fine under vfp 8.

This happens under the 9.0sp1 runtimes as well, with the exception that the erorr generated is related to an invalid foxref.dbf.

We have tried (on seperate computers) opening the same project (this project is 2 years old and has never been moved) we can recompile and build the project on vfp8 with no issues. However when it is recompiled and built in vfp9 (with or without sp1), we get the error * Mheader1 Parent Class MHeader Definition not Found when trying to open any of above mentioned scx files.

Anyone else seen this. Any Ideas?

Jim


* TO REPRODUCE UNDER VFP9.0SP1

Before running this code Save the class defintions found below into a seperate prg named col_classes.prg. You will also need to change the paths accordingly. This code, creates a form, adds a grid and then set the memberclass and then sets the columncount = 2. It then saves the form and then tries to reopen it.

Note: If you comment out the line .grid1.ColumnCount = 2 all works well.
Note: If you comment out the HeaderClass/Libray lines in the classes all workS well.
*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* Prg to reproduce. Save to a seperate prg.
*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
otestform = CREATEOBJECT("FORM")
WITH otestform
.CAPTION = "Test of MemberClass/HeaderClass for Grid Headers"
.AddObject("grid1", "GRID")
.grid1.MemberClassLibrary = 'col_classes.prg'
.grid1.MemberClass = "grdcol"
.grid1.ColumnCount = 2
.grid1.Visible = .t.
.Activate
.Show
.saveas("testof_header_class_form.scx")
ENDWITH
otestform.release
otestform = ""
* The following line will error out with an Error Loading File..... 
* Mheader1 Parent Class MHeader Definition not Found. 
MODIFY FORM testof_header_class_form.scx


*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* Member and Header Class Definitions.
* Save the folowing class defintions in a seperate 
* prg named col_classes.prg and change the paths to 
* reflect the correct locations.
*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DEFINE CLASS grdcol AS COLUMN
NAME               		= "MColumn"
HEADERCLASSLIBRARY 		= "col_classes.prg"
HEADERCLASS        		= "grdhdr"
ENDDEFINE

DEFINE CLASS grdhdr AS HEADER
NAME     				= "MHeader"
CAPTION  				= "Test Header"
ENDDEFINE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform