Hi Sylvain,
After making your sample work, I've tested this
with CA-Cl*pper 5.2e, and it doesn't update the
second GET either. In Clipper :varPut() will never
modify :changed, in fact :varPut() will do nothing
else than updating the variable with the current
GET value.
To me it seems that Harbour is compatible with Clipper.
I know but in my opinion this is a bug in clipper as Varput REALY
changed the get value
so why not update the get:Changed to .T.
Do harbour have to be BUG compatible with clipper ?
No, but I would rather consider this an intentional
decision on part of the original Clipper developers,
than a bug. :changed is meant to show whether the
editing buffer has changed, not the content of the
original value.
Changing this might break a lot of code expecting the
Clipper compatible behaviour.
Quite easy to workaround on app level with such code
though:
PROCEDURE MyVarPut( o, xValue )
o:varPut( xValue )
o:changed := .T. // ; Maybe some extra logic could be added to
check if it's indeed changed.
RETURN
And use MyVarPut( o, 5 ) instead of o:varPut( 5 ).
Same can be done with subclassing.
Brgds,
Viktor
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour