FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour [OT] Will this latest Harbour change break compatibility?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
[OT] Will this latest Harbour change break compatibility?
Posted: Fri Jan 11, 2013 04:17 AM
Will this recent change break any backward-compatibility?

2013-01-10 23:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/src/vm/classes.c
* declare :SUPER and :__SUPER messages as non virtual ones.
Now ::SUPER and ::__SUPER messages executed in object method
returns casting to 1-st super object of the class in which
executed method was defined.

* harbour/include/hbclass.ch
* removed xtranslations for SUPER(): - this workaround for
missing non virtual messages in some Clipper OOP implementations
was breaking valid code which tried to use real :SUPER message
and made SUPER reserved word, i.e. it was not possible to create
code like:
LOCAL super := ::parent2
? super:v1, super:v2
Now this hack is not longer necessary and :SUPER is non virtual
massage in Harbour.
INCOMPATIBLE: If someone has some code like:
SUPER():MSG()
SUPER( PARENT ):MSG()
then please change it to:
::MSG()
::MSG()
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: [OT] Will this latest Harbour change break compatibility?
Posted: Fri Jan 11, 2013 06:22 AM
I just bit the bullet and upgrade my Harbour anyway.

One of my class which inherits from TPrinter has this line and it generates RTE
Code (fw): Select all Collapse
obj := super:new( cDocument, lUser, lMeta, cModel, lModal )


The fix was simply changing it to
Code (fw): Select all Collapse
obj := ::super:new( cDocument, lUser, lMeta, cModel, lModal )

(note the '::' preceeding 'super')

HTH
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion