DEFINE CLASS myClass as Container PROTECTED txt1 as TextBox txt2 = .F. PROCEDURE init() this.txt1 = CREATEOBJECT([TextBox]) this.txt2 = CREATEOBJECT([TextBox]) ENDPROC ENDDEFINEAfter, create the object based in "myClass" and try to access "txt1" and "txt2", thus:
* You can to do this in command window. SET PROCEDURE TO prgClass loMyObject = CREATEOBJECT([myClass]) MESSAGEBOX(loMyObject.txt1.Name) && Here occur error MESSAGEBOX(loMyObject.txt2.Name) && Here work fineI hope this help you.