Skip to content

Instantly share code, notes, and snippets.

@vpereira
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpereira/7a52dd9e7b7b2581bbfd to your computer and use it in GitHub Desktop.
Save vpereira/7a52dd9e7b7b2581bbfd to your computer and use it in GitHub Desktop.
class Foo < JrubyFX::Application
def start(stage)
Post.all.each do |p|
MyController.load_into(:initialize=>[p])
end
stage.show
end
end
Foo::launch
### my controller
class MyController
include JRubyFX::Controller
def initialize(args)
...
end
on :button_clicked
# go back to the start and let it get the next post object, and load the controller again
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment