#!ruby -Ks

require "phi" ; include Phi

module Foo
  def on_change
    self.parent.caption = "ok .. #{self}"
  end
end

class Bar < Edit
end

class Baz < Edit
  def on_change
    self.parent.caption = "ok .. #{self}"
  end
end

form = Form.new
edit1 = Bar.new form
edit1.extend Foo
edit2 = Baz.new form
edit2.top = edit1.bottom+2
form.show
mainloop

raise
