Is this possible to create class like this where ::ShowTest() method is call for get object ?
Thanks for help
Pawel
Code: Select all
Function ClassTest ()
Local oTest := Nil
oTest := Test () : New ()
Return .T.
Class Test
Data oWnd
Data oGet1
Data cGet1 Init Space (10)
Method New ()
Method ReadTest ()
Method ShowTest ()
EndClass
Method New () Class Test
Define Window ::oWnd Title 'Class Test'
@ 10, 10 Button 'Ok' Size 60, 20 Pixel Action ::ReadTest ()
Activate Window ::oWnd
Return Self
Method ReadTest () Class Test
@ 40, 10 Get ::oGet1 Var ::cGet1 Size 100, 20 Pixel On Change ::ShowTest () Of ::oWnd // this generate error message not found TGET:SHOWTEST
@ 70, 10 Button 'Ok' Size 60, 20 Pixel Action MsgInfo (Str (::oGet1 : nPos))
Return .T.
Method ShowTest () Class Test
MsgInfo (Str (::oGet1 : nPos))
Return .T.