[fpc-devel] TObject differences between fpc and delphi
Mattias Gärtner
nc-gaertnma at netcologne.de
Tue Oct 27 15:54:27 CET 2009
Zitat von Michael Van Canneyt <michael at freepascal.org>:
>
>
> On Tue, 27 Oct 2009, Florian Klaempfl wrote:
>
>> Paul Ishenin schrieb:
>>> I have compared what d2010 TObject has and found a few differences:
>>>
>>> 1. Dispatch method is virtual
>>> 2. new method: class function UnitName: string;
>>> 3. new method: function Equals(Obj: TObject): Boolean; virtual;
>>> 4. new method: function GetHashCode: Integer; virtual;
>>> 5. new method: function ToString: string; virtual;
>>>
>>> Documentation:
>>> http://docwiki.embarcadero.com/VCL/en/System.TObject.Dispatch
>>> http://docwiki.embarcadero.com/VCL/en/System.TObject.UnitName
>>> http://docwiki.embarcadero.com/VCL/en/System.TObject.Equals
>>> http://docwiki.embarcadero.com/VCL/en/System.TObject.GetHashCode
>>> http://docwiki.embarcadero.com/VCL/en/System.TObject.ToString
>>>
>>> Which of that changes are welcome for FPC?
>>
>> Since we opened the d2010 can of worms anyways, I think all would be
>> accepted.
>
> I was going to say the same :-)
>
> Although I think that TObject.ToString will give a lot of problems
> for things like tiOPF...
>
> On the other hand, UnitName may come in handy for the Lazarus IDE.
Lazarus already reads the unitname from the RTTI (see propedits.pp)
and I guess MSEgui uses that too.
There are no classes yet without RTTI in lazarus where the unit name
is needed.
Maybe it can be useful for debugging?
Mattias
More information about the fpc-devel
mailing list