[bug_fixed] New TObject's methods: Equals, ToString, etc

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
magnomp
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 08.01.2007, 17:39

[bug_fixed] New TObject's methods: Equals, ToString, etc

Post by magnomp »

As of D2009, the TObject class has new methods: Equals, ToString and GetHashCode

I noticed IZObject introduces ToString and Equals.
ToString on TZAbstractObject is declared as virtual, but as of D2009 I think it must be an override instead.
I have to test it to confirm, but afaik, if you call Equals on a TObject variable, Equals on TZAbstractObject won't get called
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Had time to check this myself.
I solved the issue this way:
- ToString : made it an override in case of {$IFDEF DELPHI12_UP}
- Renamed Hash to GetHashCode for older compilers. Not implemented again for D2009.
- Equals : added 'overload' version for D2009. So both original D2009 version and zeoslib version should be available (Zeoslib version also works for interfaces)

SVN Rev. 556.

Mark
Image
Locked