--Boundary-00RPdHUxJSk60l08
Content-Type: Multipart/Mixed;
  boundaryoundary-00RPdHUxJSk60l08"

--Boundary-00RPdHUxJSk60l08
Content-Type: text/plain;
  charsettf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Dear,
	I have a code as attachment. I want to do a query on ctrl-return, and put the 
result in a table on a new page of notebook. But as I found out, the 
append_page does nothing.
	Could someone tell me why?

Thanks.

--Boundary-00RPdHUxJSk60l08
Content-Type: application/x-ruby;
  namebc.gtk.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filenamebc.gtk.rb"

#!/usr/bin/ruby
require('rubygems')
require('gtk2')
require('fb')
db  b::Database.new(:database '192.168.0.171:/dev/hdb', :username 'sysdba', :password '123456')
window  tk::Window.new
window.default_height  00
window.default_width  00
layout  tk::VPaned.new
sqlInput  tk::TextView.new
queryResult  tk::Notebook.new
puts(queryResult)
layout.pack1(sqlInput, false, false)
layout.pack2(queryResult, false, false)
sqlInput.signal_connect('key-press-event') do |widget, event|
  if event.state.control_mask? and event.keyval Gdk::Keyval::GDK_Return
    db.connect do |conn|
      sql  select * from rdb$triggers;'
#      sql  qlInput.buffer.text
      result  onn.query(:hash, sql)
      layout  tk::VBox.new
      tmp  Gtk::ListStore.new(' + ([String] * result[0].length).join(', ') + ')'
      table  tk::TreeView.new(eval(tmp))
      layout.add(table)
      result[0].keys.each do |column|
        table.append_column(Gtk::TreeViewColumn.new(column, Gtk::CellRendererText.new, :text 0))
      end
      result.each do |res|
        row  able.model.append
        tmp  es.values.to_a
        tmp.each_index do |v_i|
          row[v_i]  mp[v_i].to_s
        end
      end
      puts(queryResult)
      queryResult.append_page(Gtk::Label.new('x'), nil)
#      queryResult.append_page(layout, nil)
    end
    false
  end
end
window.signal_connect('destroy') do
  Gtk.main_quit
end
window.add(layout)
window.show_all
Gtk.main
# charset
# charset# close
# commit
# database
# database# db_dialect
# dialect
# downcase_names
# downcase_names# drop
# execute
# generator_names
# indexes
# open?
# password
# password# procedure_names
# query
# role
# role# role_names
# rollback
# table_names
# transaction
# transaction_started
# username
# username# view_names

--Boundary-00RPdHUxJSk60l08--
--Boundary-00RPdHUxJSk60l08--