Skip to content

Instantly share code, notes, and snippets.

@komax
Created August 1, 2013 10:27
Show Gist options
  • Save komax/6130215 to your computer and use it in GitHub Desktop.
Save komax/6130215 to your computer and use it in GitHub Desktop.
require 'jrubyfx'
class FooApp < JRubyFX::Application
def initialize()
super()
@bar = 1
@spam = "ham"
end
def start(stage)
p [@bar, @spam]
with(stage, width: 400, height: 400, title: "FooApp") do
p [@bar, @spam]
layout_scene do
p [@bar, @spam]
label(text: "Foobar")
end
show
end
end
end
FooApp.launch
=begin
should print
[1, "ham"]
[1, "ham"]
[1, "ham"]
but prints
[1, "ham"]
[nil, nil]
[nil, nil]
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment