Skip to content

Instantly share code, notes, and snippets.

@manveru
Created October 7, 2010 07:47
Show Gist options
  • Select an option

  • Save manveru/614737 to your computer and use it in GitHub Desktop.

Select an option

Save manveru/614737 to your computer and use it in GitHub Desktop.
require 'ffi-tk'
root = Tk::Root.new
var = Tk::Variable.new('RubyFFI::foo')
entry = Tk::Tile::Entry.new(root, textvariable: var)
entry.pack
entry.focus
show = proc{ p var }
Tk.execute(:trace, :add, :variable, var, :write, show)
Tk.mainloop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment