Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Environment Class
Message
From
23/01/2001 12:15:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Data Environment Class
Miscellaneous
Thread ID:
00467410
Message ID:
00467410
Views:
40
Hi. I have a situation where I want to create a class based on a form. Because this form is complex, I have alot of tables/relationships in my data environment. Since saving a form as a class loses the data environment, whenever I create a form based on it would require me to reenter all that stuff - so I decided to use DEEXTRACT and Tom Rettig's Utility to extract the data enviroment and create a class for it. So far so good, but when I try to add the class (drop it onto class form) or instanciate it in code in the Init section, I get an error 'Error in Class Definition'. There is only four classes that were extracted :
DEFINE CLASS Cursor1 AS Cursor
Left = 10
Top = 20
Width = 93
Height = 90
Alias = "apinvoic"
Order = "postdte"
Database = "..\data\canaccount.dbc"
CursorSource = "apinvoic"
Name = "Cursor1"
ENDDEFINE

DEFINE CLASS Cursor2 AS Cursor
Left = 150
Top = 20
Width = 93
Height = 90
Alias = "apiitems"
Order = "refno"
Database = "..\data\canaccount.dbc"
CursorSource = "apiitems"
Name = "Cursor2"
ENDDEFINE

DEFINE CLASS Relation1 AS Relation
ParentAlias = "apinvoic"
RelationalExpr = "refno"
ChildAlias = "apiitems"
ChildOrder = "refno"
Name = "Relation1"
ENDDEFINE

DEFINE CLASS Cursor3 AS Cursor
Left = 290
Top = 20
Width = 93
Height = 90
Alias = "trans"
Order = "transref"
Database = "..\data\canaccount.dbc"
CursorSource = "trans"
Name = "Cursor3"
ENDDEFINE

DEFINE CLASS apipostde AS DataEnvironment
Left = 1
Top = 220
Width = 520
Height = 200
InitialSelectedAlias = "apinvoic"
Name = "apipostde"
ADD OBJECT oCursor1 AS Cursor1
ADD OBJECT oCursor2 AS Cursor2
ADD OBJECT oRelation1 AS Relation1
ADD OBJECT oCursor3 AS Cursor3
ENDDEFINE

Why would this give me an error?

Thanks for the help

Sandi Cassidy
scassidy@canaccount.com
Reply
Map
View

Click here to load this message in the networking platform