Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DEFINE CLASS Command
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00764418
Message ID:
00764525
Views:
28
Kevin,

A hidden property isn't accessible from outside of class definition. You can either use protected property or move GET method into parent class.
o = CREATEOBJECT("Child")
? o.GetProp()

DEFINE CLASS Child AS Parent

ENDDEFINE

DEFINE CLASS Parent AS Custom
  HIDDEN MyProp
  MyProp = .T.
  PROCEDURE GetProp
    RETURN This.MyProp 
  ENDPROC

ENDDEFINE
>Let me ask another question:
>
>I want to create a property in a base class, and use it in sub-classes.
>But I want it hidden. How do I do this?
>
<snip>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform