Is this possible?
Is this possible?
Say I have the following classes:
TOneClass = class
procedure DoThis;
end;
TAnother = class
fClass: TOneClass;
end;
var
tmp: TAnother;
Is it possible to instruct the compiler to understand this:
tmp.DoThis
instead of
tmp.fClass.DoThis ???
A kind of "default" setting after the dot ('.') like what we do with properties?
Thanks
Say I have the following classes:
TOneClass = class
procedure DoThis;
end;
TAnother = class
fClass: TOneClass;
end;
var
tmp: TAnother;
Is it possible to instruct the compiler to understand this:
tmp.DoThis
instead of
tmp.fClass.DoThis ???
A kind of "default" setting after the dot ('.') like what we do with properties?
Thanks
I know the inline directive but fail to see the relevance here actually. So I thought there maybe was another use of inline
ReplyDeleteBas Schouten well you have to declare TAnother.DoThis, but with the inline keyword it is just a direct call to TAnother.FCall.DoThis
ReplyDeleteThe 'inline' isn't that big of a deal. I typed most of an example in here three times and Google lost it each time when I clicked outside of the message area by accident. Not gonna do it again.
ReplyDelete