clear loCont=CreateObject("_container") loCont.Call() ? loCont.AddObject("c1","_custom") loCont.C1.Call() define class _container as Container name="_container" procedure call() ?"Container.Call()" ?This.Class endproc enddefine define class _custom as custom name="_custom" procedure call() ?"Custom.Call()" ?This.Class =_container::Call() endproc enddefineExample 2:
clear loCont=CreateObject("_custom") loCont.Call() ? define class _container as Container name="_container" procedure call() ?This.Class endproc enddefine define class _custom as _container name="_custom" procedure call() ?"DODEFAULT()" =DODEFAULT() ?"Custom.Call()" =_container::Call() endproc enddefineMartinJ
>CLEAR >ON ERROR ?? MESSAGE() >WITH CREATEOBJECT("vfpClassesAreBug1") > .CALL >ENDWITH >ON ERROR > > >DEFINE CLASS vfpClassesAreBug1 as ScopeResolutionBUG > PROCEDURE call > ? "SCOPE RESOLUTION " > ScopeResolutionBUG::call() > ? "DODEFAULT " > DODEFAULT() > ENDPROC >ENDDEFINE > >DEFINE CLASS ScopeResolutionBUG as custom > hiddenproperty = 1 > > HIDDEN hiddenproperty > > PROCEDURE call > ?? this.hiddenproperty > ENDPROC >ENDDEFINE >>