No he sobrecargado nunca una funcion de una clase, pero buscando en el foro encontre que se hace asi.
Code: Select all
#include "FiveWin.ch"
OVERRIDE METHOD SaveState IN CLASS TWindow WITH XSaveState
FUNCTION XSaveState()
if !Empty( ::hWnd ) .and. !::IsKindOf( "TCONTROL" ) //.and. !::WinStyle( WS_CHILD )
return STRTOHEX( GetWindowPlacement( ::hWnd ) )
endif
return ::Super:SaveState()
OVERRIDE METHOD RestoreState CLASS TWindow WITH XRestoreState
FUNCTION XRestoreState( cState )
if !Empty( ::hWnd ) .and. !Empty( cState ) .and. !::IsKindOf( "TCONTROL" ) //.and. !::WinStyle( WS_CHILD )
SetWindowPlacement( ::hWnd, HEXTOSTR( cState ) )
endif
return ::Super:RestoreState(cState)
el error al compilar es este.
Que estoy haciendo mal.c:\obraw\source\MODCLASS.prg(3) Error E0030 Syntax error "syntax error at 'METHOD'"
c:\obraw\source\MODCLASS.prg(8) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
c:\obraw\source\MODCLASS.prg(8) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
c:\obraw\source\MODCLASS.prg(9) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
c:\obraw\source\MODCLASS.prg(12) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
c:\obraw\source\MODCLASS.prg(14) Error E0030 Syntax error "syntax error at 'METHOD'"
c:\obraw\source\MODCLASS.prg(18) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
c:\obraw\source\MODCLASS.prg(18) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
c:\obraw\source\MODCLASS.prg(19) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
c:\obraw\source\MODCLASS.prg(22) Warning W0002 Ambiguous reference, assuming memvar 'SELF'
Gracias por vuestra ayuda inestimable.
Jose.