Este es un ejemplo.
- Code: Select all Expand view RUN
#Include "FiveWin.ch"
//--------------------------------
FUNCTION Main()
Local oApp, oSeg
oApp := TPrincipal():New()
oApp:Ingreso()
? oApp:lIngreso //--------> el resultado es .T.
oSeg := TSegunda():New()
? oSeg:lIngreso //--------> el resultado es .T. "como quería"
RETURN NIL
//--------------------------------
CLASS TPrincipal
DATA cVersion
CLASSDATA lIngreso
METHOD New CONSTRUCTOR
METHOD Ingreso
ENDCLASS
//--------------------------------
METHOD New() CLASS TPrincipal
::lIngreso := .F.
::cVersion := "Versión 1.0.1"
RETURN Self
//--------------------------------
METHOD Ingreso() CLASS TPrincipal
::lIngreso := .T.
RETURN NIL
- Code: Select all Expand view RUN
#Include "FiveWin.ch"
//--------------------------------
CLASS TSegunda FROM TPrincipal
METHOD New() CONSTRUCTOR
ENDCLASS
//--------------------------------
METHOD New() CLASS TSegunda
RETURN Self
Saludos,
Carlos Sincuir