object Form1: TForm1
  Left = 192
  Top = 114
  Width = 696
  Height = 602
  Caption = 'Form1'
  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 = 16
    Width = 209
    Height = 25
    Caption = '1. Compile script'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Button2: TButton
    Left = 16
    Top = 56
    Width = 209
    Height = 25
    Caption = '2. Set up script-defined event handler'
    TabOrder = 1
    OnClick = Button2Click
  end
  object Button3: TButton
    Left = 16
    Top = 96
    Width = 209
    Height = 25
    Caption = '3. Restore host-defined event handler'
    TabOrder = 2
    OnClick = Button3Click
  end
  object Memo1: TMemo
    Left = 240
    Top = 8
    Width = 441
    Height = 545
    Font.Charset = RUSSIAN_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Times New Roman'
    Font.Style = []
    Lines.Strings = (
      'type'
      '  TMyHandler = class'
      '     procedure Handle(Sender: TObject);    '
      '  end;'
      ''
      'procedure  TMyHandler.Handle(Sender: TObject);    '
      'begin'
      
        '   ShowMessage('#39'Script-defined handler. Sender:  '#39' + Sender.Clas' +
        'sName);'
      'end;'
      ''
      'procedure  TMyHandler.Dispose(Sender: TObject);    '
      'begin'
      '   Free;'
      'end;'
      ''
      'var'
      '   X: TMyHandler;'
      '   E: TNotifyEvent;'
      ''
      'procedure SetHandler; '
      'begin'
      '   E := ClickMe.OnClick;'
      '   ClickMe.OnClick := X.Handle;'
      'end;'
      ''
      'procedure RestoreHandler; '
      'begin'
      '   ClickMe.OnClick := E;'
      'end;'
      ''
      'begin'
      '   X := TMyHandler.Create;'
      ''
      '  ClickMe.OnClick(X);'
      ''
      '   Form1.OnDestroy := X.Dispose;'
      
        '   ShowMessage('#39'The script was compiled and initialized successf' +
        'ully.'#39');'
      'end.'
      ''
      '')
    ParentFont = False
    TabOrder = 3
  end
  object ClickMe: TButton
    Left = 24
    Top = 440
    Width = 201
    Height = 105
    Caption = 'ClickMe'
    TabOrder = 4
    OnClick = ClickMeClick
  end
  object PaxCompiler1: TPaxCompiler
    DebugMode = False
    Left = 632
    Top = 64
  end
  object PaxPascalLanguage1: TPaxPascalLanguage
    CompleteBooleanEval = False
    Left = 640
    Top = 112
  end
  object PaxProgram1: TPaxProgram
    Console = False
    Left = 632
    Top = 152
  end
end
