Created
August 5, 2013 09:47
-
-
Save komax/6154713 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
#!/usr/bin/env jruby | |
require 'jrubyfx' | |
class MyApp < JRubyFX::Application | |
def init | |
puts "called init" | |
params = getParameters | |
puts params.nil? | |
puts params.getNamed | |
end | |
def start(stage) | |
puts "before start" | |
with(stage, title: "MyApp", width: 300, height: 300) do | |
layout_scene do | |
label("fool") | |
end | |
show | |
end | |
end | |
end | |
MyApp.launch("spam") | |
=begin | |
Output on latest jruby, jrubyfx and FXMLLoader: | |
% ./jrubyfx_parameterized_launch.rb | |
called init | |
true | |
Error running Application: | |
#<NoMethodError: undefined method `getNamed' for nil:NilClass> | |
./jrubyfx_parameterized_launch.rb:11:in `init' | |
/home/max/Programmierung/gsoc/jruby/lib/ruby/gems/shared/gems/jrubyfx-1.0.0-java/lib/jrubyfx/java_fx_impl.rb:112:in `launch_app_after_platform' | |
/home/max/Programmierung/gsoc/jruby/lib/ruby/gems/shared/gems/jrubyfx-1.0.0-java/lib/jrubyfx/java_fx_impl.rb:89:in `launch_app_from_thread' | |
/home/max/Programmierung/gsoc/jruby/lib/ruby/gems/shared/gems/jrubyfx-1.0.0-java/lib/jrubyfx/java_fx_impl.rb:62:in `launch_app' | |
org/jruby/gen/InterfaceImpl1321811083.gen:13:in `run' | |
./jrubyfx_parameterized_launch.rb 12,82s user 0,22s system 239% cpu 5,454 total | |
=end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment