Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding parent methods
Message
From
08/11/2006 14:25:25
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Hiding parent methods
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01168198
Message ID:
01168198
Views:
49
I have created a sub class of the parent class object and have turned mySubClass into a COM object. But I only want to expose the new methods in my class, and hide all the methods in the parent class. Can this be done?

Would I have to use the HIDDEN key word in the DEFINE CLASS statement of the parent? Basically mySubClass has new methods that access the parents methods but I don't want the user to see the parent's methods, just mySubClass methods.
*Main.prg
DEFINE CLASS myparent AS CUSTOM
*Properties here.
 Someprop1 = ""
 Someprop2 = ""
***Methods here.
PROCEDURE someproc1
PROCEDURE someproc2
ENDDEFINE


*Myprg.prg
DEFINE CLASS mysubclass AS myparent OLEPUBLIC

 myProperty1 = ""
 myProperty2 = ""

PROCEDURE MyNewMethod1
  THIS.someproc1()
ENDPROC

PROCEDURE MyNewMethod2
  THIS.someproc2()
ENDPROC

ENDDEFINE
Thanks,

Jerry
Next
Reply
Map
View

Click here to load this message in the networking platform