Skip to content

Instantly share code, notes, and snippets.

Created November 5, 2015 00:54
Show Gist options
  • Save anonymous/e2680eff52df108703df to your computer and use it in GitHub Desktop.
Save anonymous/e2680eff52df108703df to your computer and use it in GitHub Desktop.
module Goo
class Window
def initialize
bar = Bar.new
end
end
class Bar
def initialize
...
@butt = Tk::Tile::Button.new(@cont){text "create"; command "Goo::Foo.bar.selection";default "active"}
...
end
def selection
#does stuff
end
end
Foo = Window.new
end
#issue; note line 4 the command is given as a string to be executed in the global scope. i would like to reuse this code in another class and so require a way of dynamicly accessing the 'local' scope!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment