Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created August 27, 2012 17:18
Show Gist options
  • Select an option

  • Save jwoertink/3490511 to your computer and use it in GitHub Desktop.

Select an option

Save jwoertink/3490511 to your computer and use it in GitHub Desktop.
require 'java'
require 'jme3_2012_08_02.jar'
java_import "com.jme3.app.SimpleApplication"
class Sample1 < SimpleApplication
def simpleInitApp
# This method is required for jME to work
# defining as simple_init_app fails
end
end
Sample1.new.start
require 'java'
require 'swt'
@style = Swt::Custom::StyleRange.new
# This works
@style.fontStyle = Swt::SWT::BOLD
# undefined method font_style= for StyleRange
#@style.font_style = Swt::SWT::BOLD
# Original method is
# style.fontStyle = SWT.BOLD;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment