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:
01044133
Vues:
16
>>Hi all,
>>
>>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?
>
>this fix the issue:
>
>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
>
Fabio,

I don't see the difference between your code and mine. Am I missing something?
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform