Page 1 of 1

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

Posted: 02.12.2008, 01:19
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

Posted: 25.12.2008, 23:23
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