You might have discovered that I’m a fan of Delphi class helpers.
This is another case where I’d like to use the for … in statement: accessing the Components of a TComponent instance.
So I wanted to end up with this:
[sourcecode language=’delphi’]
procedure MyForm.FormCreate(Sender: TObject);
var
Component: TComponent;
begin
for Component in Self do
begin
// business logic goes here
end;
end;
[/sourcecode]





