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 ENDDEFINEI'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 - UndefinedI found out the problem is on cInApplication parameter of NewObject function.
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.
"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