* Project: TestPrivateClassInterface * Program: myTestInterface define class myTestInterface as Session olepublic function Test() as Boolean endfunc function AnotherTest() as Boolean endfunc enddefine
* Project: TestPrivateClass * Program: myMainTest define class myMainClass as Session OLEPUBLIC protected myObject as Object function getMyObject() as Object return this.myObject endfunc function init() as Boolean this.myObject = Createobject('myTestClass') endfunc enddefine * Now define your child class without OLEPUBLIC define class myTestClass as Session IMPLEMENTS Imytestinterface IN "testprivateclassinterface.myTestInterface" PROCEDURE Imytestinterface_Test() AS LOGICAL return .t. ENDPROC PROCEDURE Imytestinterface_AnotherTest() AS LOGICAL return .f. ENDPROC enddefine[Update] Silly me... I opened the wrong DLL that is why I saw those methods, Now I see my wrong ways, the intellisense part is right thou[/update]
loTest = Createobject('TestPrivateClass.myMainClass') loMyTestObject = Getinterface(loTest.getMyObject(), 'ImyTestInterface', 'TestPrivateClassInterface.DLL')now intellisense will show
loMyTestObject. AnotherTest Test>I should have mentioned that I want it to be OLEPUBLIC, as I want it to appear
>>> >>>** Main Class >>>PROCEDURE GetChildClass() AS Object >>> >>> LOCAL oRetVal AS Object >>> >>> PUBLIC gb_AllowChildClass && This must exist in the child class Init >>> >>> oRetVal = This.GetChildClass() >>> >>>ENDPROC >>>>>>
>>>PROCEDURE Init() >>> >>> LOCAL bRetVal AS Boolean >>> bRetVal = .T. >>> >>> IF TYPE("AllowChildClass") = "U" >>> bRetVal = .F. >>> ENDIF >>> >>> RETURN bRetVal >>> >>>ENDPROC >>>>>>