Hello Viktor
Szakáts Viktor wrote:
>
> Pls explore source/tget.prg, there you can find examples
> for both this method and ACCESS/ASSIGN method. Latter can
> help on performance.
>
Here is the code snippet from tget.prg
METHOD block( bBlock ) SETGET
ACCESS changed METHOD getChanged()
ASSIGN changed METHOD setChanged( lChanged )
METHOD block( bBlock ) CLASS Get
IF PCount() == 0 .OR. bBlock == NIL
RETURN ::bBlock
ENDIF
::bBlock := bBlock
::xVarGet := ::original
::cType := ValType( ::xVarGet )
RETURN bBlock
METHOD getChanged() CLASS Get
RETURN ::lChanged
METHOD setChanged( lChanged ) CLASS Get
IF ISLOGICAL( lChanged )
RETURN iif( ::hasFocus, ::lChanged := lChanged, lChanged )
ENDIF
RETURN .F.
What I can see from above is that ACCESS/ASSIGN methods
can not be overloaded in another class is inherited from the current one.
SETGET methods can be overloaded. This is a basic requirement to
simulate Xbase++ class modal.
Am I right ?
Any ideas how to combine both strategies to speed up the opration ?
Regards
Pritpal Bedi
--
View this message in context:
http://www.nabble.com/Classes%3A-Methods-and-Instance-Variables-with-SAME-Name-tp20354744p20409191.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour