Am 07.06.2011 15:30, schrieb Hans-Peter Diettrich:
There are LCL applications. ShowControl existed since revision 5536 in
the LCL. You can find out such facts with svn blame.

How are these affected by an added default parameter?

type
  TWinControl = class
  protected
    // this is the procedure that's extended by you with a default param
procedure ShowControl(aControl: TControl; aSomeOtherParam: TSomeType = stValue); virtual;
  end;

// this is some 3rd party control that isn't modified, but overrides ShowControl
  TSomeOtherControl = class(TWinControl)
  protected
    procedure ShowControl(aControl: TControl); override;
  end;

Compilation will generate the following error: There is no method in ancestor class to be overridden.

That's quite an affection, don't you think? ;)

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to