ruby-processing / propane

A simpler ruby-processing for linux/Windows/MacOS?
https://ruby-processing.github.io/propane
GNU General Public License v3.0
27 stars 1 forks source link

Can't use processing slider with control_panel since jdk9 #21

Closed monkstone closed 6 years ago

monkstone commented 6 years ago

Environment

NB: jdk9.0.4 from oracle.

Using custom propane (compiled with openjdk8 targeting jdk8) modified to use public runPropane() instead of protected runSketch() test sketch see https://github.com/ruby-processing/propane-examples/blob/master/contributed/jwishy.rb.

Expected Behavior

Sketch runs fine with jdk8

Actual Behavior

org.jruby.exceptions.RaiseException: (TypeError) illegal access on 'fireStateChanged': class org.jruby.javasupport.JavaMethod cannot access a member of class javax.swing.JSlider (in module java.desktop) with modifiers "protected"
    at RUBY.initialize(/home/tux/.gem/ruby/2.3.0/gems/propane-2.6.5.pre-java/library/control_panel/control_panel.rb:28)
    at RUBY.slider(/home/tux/.gem/ruby/2.3.0/gems/propane-2.6.5.pre-java/library/control_panel/control_panel.rb:134)
    at home.tux.propane_minus_examples.contributed.jwishy.block in setup(/home/tux/propane-examples/contributed/jwishy.rb:20)
    at RUBY.control_panel(/home/tux/.gem/ruby/2.3.0/gems/propane-2.6.5.pre-java/library/control_panel/control_panel.rb:170)
    at home.tux.propane_minus_examples.contributed.jwishy.setup(/home/tux/propane-examples/contributed/jwishy.rb:17)

Other

eg installation issue (just use this header and explain the problem as best you can)

monkstone commented 6 years ago

There is a work around, ditch fireStateChanged and set values in sketch rather control panel setup.

monkstone commented 6 years ago

Fixed in propane-2.7.1