No the prg is doesn't run in COM>2. Create a function (MYFUNC) in MAIN.PRG that will be accessible by the classes since MYFUNC is needed by those two classes?
the answer is again No.>
If you whant to do this then use the following DEFINE CLASS mybaseCom AS Session PROCEDURE Init This.SetupEnvironment() ENDPROC PROTECTED PROCEDURE SetupEnvironment SET DELETE ON SET DATE TO SHORT aditional set enviroment stuff ENDPROC PROCEDURE MyFunc(param1,param2,paramn) AS String ...Pur your base code where if any ENDPROC ENDDEFINE DEFINE CLASS Class1 AS mybaseCom OLEPUBLIC PROCEDURE MyFunc(param1,param2,paramn) AS String ...Put the specified code here and call dodefault if ids the case ENDPROC ENDDEFINE DEFINE CLASS Class2 AS mybaseCom OLEPUBLIC PROCEDURE MyFunc(param1,param2,paramn) AS String ...Put the specified code here and call dodefault if ids the case ENDPROC ENDDEFINE