The Wiert Corner – irregular stream of Wiert stuff

Jeroen Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20120216-Word-Convert-To-Text

    MPS_6399

    MPS_6398

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 386 other followers

Archive for May 7th, 2009

Delphi – class helper to add for … in support for TComponent.Components / ComponentCount

Posted by jpluimers on 2009/05/07

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:

procedure MyForm.FormCreate(Sender: TObject);
var
  Component: TComponent;
begin
  for Component in Self do
  begin
  // business logic goes here
  end;
end;

Read the rest of this entry »

Posted in Component Development, Delphi, Development | 11 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 386 other followers