Class completion automates the definition of new classes by generating skeleton code for Delphi class members that you declare.
type TMyButton = class(TButton) property Size: Integer; procedure DoSomething; end;
type TMyButton = class(TButton) private FSize: Integer; procedure SetSize(const Value: Integer); published property Size: Integer read FSize write set_Size; procedure DoSomething; end;
The following skeleton code is added to the implementation section:
{ TMyButton } procedure TMyButton.DoSomething; begin end; procedure TMyButton.SetSize(const Value: Integer); begin FSize := Value; end;
If your declarations and implementations are sorted alphabetically, class completion maintains their sorted order. Otherwise, new routines are placed at the end of the implementation section of the unit and new declarations are placed in private sections at the beginning of the class declaration.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|