> loTest = NewObject("MyClassName", "MyPRGName.PRG", "MyExecutableName.EXE") >> If I have a class in a program(.EXE) and I want to use this class of an
************************************************** *-- Class: areport (d:\programm\schedule\vcx\reporthandler.vcx) *-- ParentClass: custom *-- BaseClass: custom *-- Time Stamp: 03/08/04 03:45:05 PM * DEFINE CLASS areport AS custom *-- Name of the Class to Instantiate PROTECTED cclass cclass = "" *-- Name of th ClassLib to take the class from PROTECTED cclasslib cclasslib = "SCHEDREPORTS.FXP" Name = "areport" *-- Return the Report-Object PROCEDURE getreport lparameters tcClass, tcClassLib tcClass = iif(vartype(tcClass) = "C", tcClass, This.cClass) tcClassLib = iif(vartype(tcClassLib) = "C", tcClassLib, This.cClasslib) return NewObject(tcClass, tcClassLib) ENDPROC ENDDEFINE * *-- EndDefine: areport **************************************************As You see, there is barely anything in it.
loMyObject = NewObject("aReport", "ReportHandler.vcx", "MyEXE.exe", <PRG_Class>, <PRG_FileName>)HTH