require "phi"
require "rdb"

table = RDB::Table.new
table.database_name = 'DBDEMOS'
table.table_name = 'biolife.db'
table.active = true

data_source = RDB::DataSource.new table

form = Phi::Form.new

edit = RDB::DBEdit.new form, :edit1, "edit1"
edit.data_field = 'common_name'
edit.data_source = data_source
edit.align = Phi::AL_TOP

grid = RDB::DBGrid.new form, :grid
grid.data_source = data_source
grid.align = Phi::AL_CLIENT

p edit.read_only
p edit.is_masked
p edit.max_length
#edit.max_length = 8
#p edit.max_length
#edit.edit_text = "foo"
#edit.text = "foo"
p edit.text

form.show
Phi.mainloop
