DelphiFAQ Home Search:
General :: Programming :: Delphi
General Delphi related information.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

Allowing Delphi to remove your empty methods

By default, Delphi removes any empty event handlers each time your save or rebuild your application. However, you may have noticed that it doesn't remove your methods--even if they're empty.

The secret to this phenomenon is that Delphi places event handlers in the published section of the form's class declaration. (This is the section between the classname specifier and the private section of the class declaration.) If you place your methods in the same section of the class declaration, as shown below, then it will not remove your method, even if empty.

type
   TForm1 = class(TForm)
     procedure MyProc;
   private
     { private declarations }
   public
     { public declarations }
   end;
 
You don't like the formatting? Check out SourceCoder then!
Generated 4:01:47 on Sep 22, 2017