>>>Define Class AppObjectBase As Custom >>> >>> lExe = .f. >>> lDevMode = .f. >>> cAppName = "" >>> cCurrentModule = "" >>> cActiveForm = "" >>> cCurrentVersion = "" >>> cTempFilesPath = "C:\Temp\" >>> >>> oConfig = .null. >>> oUser = .null. >>> oSql = .null. >>> oTracker = .null. >>> oBO = .null. >>> >>> *--------------------------------------------------------------------------------------- >>> Procedure Init >>> >>> *-- In your override of this method, you'd wire up all the objects and properties >>> *-- that are hosted in this class. >>> >>> *-- Example setup work displayed below. Every app is different, so do whatever you need to >>> *-- get this global goApp ready for use by your application >>> *--------------------------------------------------------------------------------------- >>> >>> * This.oConfig = NewObject("LmConfig", "LmConfig.prg") >>> * This.oValues = NewObject("Values", "Values.prg") >>> >>> * lcRunningFilename = JustFname(_vfp.ServerName) >>> * This.cCurrentVersion = lcRunningFilename >>> >>> * If This.lDevMode and This.lUseTestData >>> * This.oConfig.Connstring = Strtran(This.oConfig.Connstring, "LMDB", "LMDB_TEST",1,99,1) >>> * Endif >>> >>> EndProc >>> >>> *--------------------------------------------------------------------------------------- >>> Procedure LogError(tcErrorMessage) >>> >>> *-- Again, in your override, handle any calls to LogError() however you neede to. >>> *-- If you assign This.oBO in the Init() method, then you can use the wwBusinessPro.LogError() method >>> *-- as shown below. If not, then override and do whatever magic you need or want to do to handle these calls. >>> >>> This.oBO.LogError(tcErrorMessage) >>> >>> Endproc >>> >>> *--------------------------------------------------------------------------------------- >>> Procedure lExe_Access >>> >>> Local lcApp, llExe >>> >>> lcApp = Sys(16,1) >>> llExe = '.EXE' $ Upper(lcApp) >>> >>> Return llExe >>> >>> Endproc >>> >>> *--------------------------------------------------------------------------------------- >>> Procedure lDevMode_Access >>> >>> Return !This.lExe >>> >>> Endproc >>> >>> >>> *--------------------------------------------------------------------------------------- >>> *- This handy method gives you a simple and common way to setup Classlibs and Procedure files >>> *-- into your app setup calls. >>> Procedure Require(tcAsset) >>> >>> DO CASE >>> CASE ".vcx" $ Lower(tcAsset) >>> Set Classlib To (tcAsset) Additive >>> >>> Case ".fll" $ Lower(tcAsset) >>> Set Library To (tcAsset) Additive >>> *-- Assumes .prg or no extension >>> Otherwise >>> Set Procedure To (tcAsset) Additive >>> ENDCASE >>> >>> EndProc >>> >>> >>>EndDefine >>> >>>