-
-
Save vpereira/7a52dd9e7b7b2581bbfd 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
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