require "phi"
require "dir_to_dataset"

form = Phi::Form.new

grid = RDB::DBGrid.new form
dataset = dir_to_dataset
grid.data_source =  RDB::DataSource.new(dataset)

btn = Phi::Button.new form
btn.align = Phi::AL_TOP
grid.align = Phi::AL_CLIENT

dataset.before_insert = proc{ Phi.abort }
btn.on_click = proc{p :click }

form.show
Phi.mainloop
