Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in DEFINE CLASS x AS y OF ClassLib.PRG
Message
From
05/12/2001 11:17:37
 
 
To
04/12/2001 12:35:26
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00589361
Message ID:
00589902
Views:
39
>DEFINE CLASS deSD AS deIDSD OF deSD.PRG
>I changed the syntax to DEFINE CLASS deSD AS deIDSD OF deSD.FXP and that worked.

I think this is at the very least a documentation error, if not a product bug, and I passed it up the line for you. Here is some test code you can use to test with PRG and VCX classes. I need the FXP extension for the PRG class to be recognized in the EXE, and the VCX extension for the visual class library to be recognized.
CLEAR 
DELETE FILE testxx.pjx
CREATE PROJECT testxx nowa
TEXT TO lcText NOSHOW 
ox = CREATEOBJECT('form2')
ox.show(1)
* change to OF testxxB.vcx to test with VCX.
DEFINE CLASS form2 AS form1 OF testxxA.fxp
ENDDEFINE
ENDTEXT 
DELETE FILE testxx.prg
=STRTOFILE(lcText,'testxx.prg',0)

TEXT TO lcText NOSHOW 
DEFINE CLASS form1 AS form 
autocenter = .t.
Caption = this.classlibrary
ENDDEFINE
ENDTEXT 
DELETE FILE testxxA.prg
=STRTOFILE(lcText,'testxxA.prg',0)

DELETE FILE testxxB.vc?
CREATE CLASS form1 OF testxxB.vcx as form NOWAIT 
ASELOBJ(xx,1)
xx[1].autocenter = .t.
xx[1].writemethod('init','this.caption = this.classlibrary')
ACTIVATE WINDOW 'class designer'
KEYBOARD '{ctrl+w}'

_vfp.ActiveProject.files.add('testxx.prg')
_vfp.ActiveProject.files.add('testxxA.prg')
_vfp.ActiveProject.files.add('testxxB.vcx')
IF !_vfp.ActiveProject.Build('testxx.exe')
	?"build failed"
	_vfp.ActiveProject.close
	RETURN 
ENDIF 
_vfp.ActiveProject.close
DELETE FILE testxxA.prg
DELETE FILE testxxA.fxp
DELETE FILE testxxB.vc?
lcRuncmd ="! /n "+SET("Default")+CURDIR()+'testxx.exe'
&lcRuncmd 
RETURN 
Thanks for bringing this to our attention!
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform