darrellblackhawk
Programmer
* Here's a little anomaly
* When the the go() method is called on CConcreteClass
* the hidden property "cKey" of oHidden2 is
* visible to CConcreteClass.
* cKey is not visible to CConcreteClass in any
* other aggregated object.
* At the outer "set step on" things are as expected
* hmmmmm....
* I guess it kinda makes sense since oHidden2 is defined
* as a hidden property of CConcreteClass, but I don't think so.
* Is this a bug in VFP?
* When the the go() method is called on CConcreteClass
* the hidden property "cKey" of oHidden2 is
* visible to CConcreteClass.
* cKey is not visible to CConcreteClass in any
* other aggregated object.
* At the outer "set step on" things are as expected
* hmmmmm....
* I guess it kinda makes sense since oHidden2 is defined
* as a hidden property of CConcreteClass, but I don't think so.
* Is this a bug in VFP?
Code:
local o
o = createobject("CConcreteClass")
o.go()
set step on
define class CConcreteClass as custom
add object oHidden1 as CAggregateWithHiddenProp
add object protected oHidden2 as CAggregateWithHiddenProp
add object oProtected1 as CAggregateWithProtectedProp
add object protected oProtected2 as CAggregateWithProtectedProp
procedure go
set step on
endproc
enddefine
define class CAggregateWithHiddenProp as custom
hidden cKey
cKey = ""
enddefine
define class CAggregateWithProtectedProp as custom
protected cKey
cKey = ""
enddefine