OOP Delphi

procedure Form1.Edit1Change(Sender : TObject);
begin
{ temporarily disable the event handler }
Edit1.OnChange := NIL;
if Edit1.Text = 'Some Text' then
Edit1.Text := 'New Text';
{ enable the event handler again }
Edit1.OnChange := Edit1Change;
end;