> Good question though. What is the difference between
>
> t1.create
>
> and
>
> t1 := <myclassname>.Create ?
t1.create calls the constructor create of object t1, but does not actually
create a new object. In this case, the constructor is called as a normal
method. There is a hidden flag parameter that the compiler passes into the
constructor to differentiate creating an object instance; as in:
t1 := <myclassname>.Create
to calling the constructor directly.
This allows you to call the constructor directly; which may be useful if you
have multiple constructors for your class, but all must call some form of
initialisation code. You would then put the init code into the default
constructor and all other constructors call it.
The hidden flag is also used when you call the inherited constructor.
Regards,
Dennis.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz