Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Class Library - Undefined
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01044080
Message ID:
01044090
Vues:
11
AFAIK, the third parameter in the NEWOBJECT() should be an empty string not Null.
m.oService=NEWOBJECT("CIAEA", ;
	"MAIN.FXP", ;
	"", ; 
...
>
>By compile the code below:
>
>PUBLIC oService as CIAEA OF MAIN.PRG
>
>m.oService=NEWOBJECT("CIAEA", ;
>	"MAIN.FXP", ;
>	null, ; && Problem here
>	IIF(_vfp.StartMode>0,ADDBS(JUSTPATH(_vfp.ServerName)),FULLPATH("")), ;
>IIF(_vfp.StartMode>0,ADDBS(JUSTPATH(_vfp.ServerName))+"data\",FULLPATH("")+"data\") ;
>	)
>
>m.oService.Show()
>READ EVENTS
>
>DEFINE CLASS CIAEA as Form
>	PROCEDURE Init(lpcAppPath,lpcDataPath)	
>	ENDPROC &&Init
>	PROCEDURE Destroy
>		CLEAR EVENTS
>	ENDPROC && Destroy
>ENDDEFINE
>
>
>I'm getting an error:
>
>* contents of main.err
>Program c:\my documents\visual foxpro projects\iaea\main.prg has the following errors:
>    Visual Class Library  - Undefined
>
>
>
>I found out the problem is on cInApplication parameter of NewObject function.
>This should not happen according to the documentation of NewObject function.
>But it doesn't stop me from building an exe if I "Ignore All" during building.
>
>If I change the code:
>
>m.oService=NEWOBJECT("CIAEA", ;
>	"MAIN.FXP", ;
>	null, ; && Problem here
>	IIF(_vfp.StartMode>0,ADDBS(JUSTPATH(_vfp.ServerName)),FULLPATH("")), ;
>IIF(_vfp.StartMode>0,ADDBS(JUSTPATH(_vfp.ServerName))+"data\",FULLPATH("")+"data\") ;
>	)
>
>to
>
>m.oService=CREATEOBJECT("CIAEA", ;
>	IIF(_vfp.StartMode>0,ADDBS(JUSTPATH(_vfp.ServerName)),FULLPATH("")), ;
>	IIF(_vfp.StartMode>0,ADDBS(JUSTPATH(_vfp.ServerName))+"data\",FULLPATH("")+"data\") ;
>	)
>
>then everything is AOK.
>
>Is this a known bug?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform