I'm unable to reproduce your error. Real code that I could actually compile
and
run would make this a lot easier.
Perhaps you're using an old version of the compiler where TObject doesn't
have Equals method (added for Delphi compatibility along with UnitName and
ToString)
prefixing by the
try prefixing by the unit name:
procedure tcls.method(x,y: tt);
begin
if a.equals(x,y) then
...
end;
Thierry
leledumbo wrote:
consider the following code snippet:
code
unit a;
interface
type
tt = ...
tcls = class
procedure method(x,y: tt);
end;
function equals(x,y: tt):
consider the following code snippet:
code
unit a;
interface
type
tt = ...
tcls = class
procedure method(x,y: tt);
end;
function equals(x,y: tt): boolean;
implementation
function equals(x,y: tt): boolean;
begin
...
end;
procedure tcls.method(x,y: tt);
begin
if equals(x,y) then
On Mon 3 May 2010, leledumbo wrote:
In the code above, equals will refer to tobject.equals instead of equals
defined in the unit. How can I refer to that one instead?
I'm unable to reproduce your error. Real code that I could actually compile and
run would make this a lot easier.
That said,