> then instead of
> var
> MyForm : TMyForm;
>
> delete the IDE created variable and add
>
> type
> TCreateMyForm = function( aOwner : TComponent ) : TMyForm;
>
> var
> CreateMyForm : TCreateMyForm;
>
and if you think they shouldn't be called virtual constructors, what about
constructor function variables?
Form constructor variables?
Global form constructors?
and since the technique is not limited to forms:
Global variable constructors?
Variable Global constructors?
Variable Global Variables?
Global Variable Variable constructors?
Global Variable constructor variables?
Variable Global constructor variables?
My favourite is:
function pointers
But without the Delphi compiler's wonderful type checking, if we all used
function pointers then we would all end up writing code like Windows uses ON
THE INSIDE. (scary isn't it)
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"