object Form1: TForm1
  Left = 19
  Top = 116
  Width = 494
  Height = 519
  Caption = 'Script-defined event handler demo'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 16
    Top = 8
    Width = 273
    Height = 25
    Caption = 'Create event handler for Button2.OnClick event'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Button2: TButton
    Left = 392
    Top = 432
    Width = 75
    Height = 25
    Caption = 'Button2'
    TabOrder = 1
  end
  object Memo1: TMemo
    Left = 16
    Top = 40
    Width = 273
    Height = 433
    Font.Charset = RUSSIAN_CHARSET
    Font.Color = clWindowText
    Font.Height = -15
    Font.Name = 'Times New Roman'
    Font.Style = []
    Lines.Strings = (
      'type'
      '  TMyHandler = class'
      '     procedure Handle(Sender: TObject);    '
      '     procedure Dispose(Sender: TObject);    '
      '  end;'
      ''
      'procedure  TMyHandler.Handle(Sender: '
      'TObject);    '
      'begin'
      '   ShowMessage('#39'Sender:  '#39' + '
      'Sender.ClassName);'
      'end;'
      ''
      'procedure  TMyHandler.Dispose(Sender: '
      'TObject);    '
      'begin'
      '   Free;'
      'end;'
      ''
      'var'
      '   X: TMyHandler;'
      'begin'
      '   X := TMyHandler.Create;'
      '   Button2.OnClick := X.Handle;'
      '   Form1.OnDestroy := X.Dispose;'
      'end.'
      '')
    ParentFont = False
    TabOrder = 2
  end
  object Button3: TButton
    Left = 312
    Top = 8
    Width = 161
    Height = 25
    Caption = 'Remove event handler'
    TabOrder = 3
    OnClick = Button3Click
  end
  object Memo2: TMemo
    Left = 312
    Top = 40
    Width = 161
    Height = 73
    Font.Charset = RUSSIAN_CHARSET
    Font.Color = clWindowText
    Font.Height = -15
    Font.Name = 'Times New Roman'
    Font.Style = []
    Lines.Strings = (
      'begin'
      '  Button2.OnClick := nil;'
      'end.')
    ParentFont = False
    TabOrder = 4
  end
  object PaxCompiler1: TPaxCompiler
    Alignment = 1
    DebugMode = False
    Left = 216
    Top = 168
  end
  object PaxPascalLanguage1: TPaxPascalLanguage
    CompleteBooleanEval = False
    UnitLookup = True
    Left = 416
    Top = 200
  end
  object PaxProgram1: TPaxProgram
    Console = False
    Left = 200
    Top = 224
  end
  object PaxProgram2: TPaxProgram
    Console = False
    Left = 424
    Top = 72
  end
  object PaxCompiler2: TPaxCompiler
    Alignment = 1
    DebugMode = False
    Left = 368
    Top = 80
  end
end
