Created
August 1, 2013 10:27
-
-
Save komax/6130215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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