[OT] Will this latest Harbour change break compatibility?

[OT] Will this latest Harbour change break compatibility?

Postby hua » Fri Jan 11, 2013 4: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:
::SUPER:MSG()
::PARENT:MSG()
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: [OT] Will this latest Harbour change break compatibility?

Postby hua » Fri Jan 11, 2013 6: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: Select all  Expand view
obj := super:new( cDocument, lUser, lMeta, cModel, lModal )


The fix was simply changing it to
Code: Select all  Expand view
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
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 110 guests