<byteit101[m]> enebo: Is there a way to get the block arg to the super call?
<GGibson[m]> Does anyone want to discuss jrubyfx at the moment?
<byteit101[m]> sure
<byteit101[m]> G. Gibson: What do you want to discuss?
<GGibson[m]> Well
<GGibson[m]> I notice it all acts upon Classes, not instances of Window classes.
<GGibson[m]> this is a bummer
<GGibson[m]> I need to sport multiple windows
<byteit101[m]> "it" ?
<GGibson[m]> jrubyfx
<GGibson[m]> sorry
<byteit101[m]> What specifically?
<GGibson[m]> launching for one
<GGibson[m]> it appears to create a new intstance of the window class I defined
<GGibson[m]> and I need to direct resource information into that instanc
<GGibson[m]> * and I need to direct resource information into that instance
<GGibson[m]> I'm essentially attempting to drive window creation based upon a db record.
<byteit101[m]> Stage.new.tap{|stage| ... }.show
<GGibson[m]> hrm ... ok
<GGibson[m]> oh clicky ... thanks
<GGibson[m]> oh ok -- so I'll need to learn some java then
<byteit101[m]> At least reading it to translate to ruby
<GGibson[m]> sure
<byteit101[m]> the big thing to know is that fxmlloader is the only very different line
<GGibson[m]> I will probably not be using fxml
<GGibson[m]> What I do is generate dsl script from a database structure record
<GGibson[m]> I'm looking to eval(thingy).call(stage) it
<GGibson[m]> that direction
<byteit101[m]> Ah, that's an interesting approach
<GGibson[m]> I do things like that ;)
<GGibson[m]> the reason I'm doing it is that I plan to construct a window that edits those records a la IDE
<GGibson[m]> utterly avoiding xml like the plague
<byteit101[m]> stage = Stage.new; stage.scene = eval(thingy); stage.title = "foo"; stage.show; #where thingy evaluates to a Scene Object
<GGibson[m]> Stage is an unknown constant -- ::JRubyFX::Stage?
<byteit101[m]> > utterly avoiding xml like the plague
<byteit101[m]> I've found xml is most useful and intuitive for UI's actually. FXML is only topped by XAML (Windows)
<byteit101[m]> Ah, right, constants are fun. You can either import all of them, or do it selectively.
<GGibson[m]> well, my script generator allows me to drop in script snippets at will anyplace and I dig the flexibility it will give me.
<GGibson[m]> ah ok
<GGibson[m]> I'll sniff the github source
<byteit101[m]> If you are in a class that extends JRubyFX the lookup will work
<byteit101[m]> otherwise, stage is from javafx.stage.Stage
<GGibson[m]> I subclassed JRubyFX::Application
<byteit101[m]> Yes, that's an override of javafx.application.Application
<GGibson[m]> ok
<byteit101[m]> the FX classes can always be looked up via JRubyFX::FXImports::
<byteit101[m]> but you can import them into other contexts, such as via
<byteit101[m]> include JRubyFX
<byteit101[m]> If you subclassed JRubyFX::Application, then the constants *should* be there for you
<GGibson[m]> ok great
<byteit101[m]> out of curiosity, how are you building `thingy` above? strings or an ast library?
<GGibson[m]> I generate a string
<GGibson[m]> hrm
<GGibson[m]> I get this error: /opt/jruby-9.2.14.0/lib/ruby/stdlib/irb/init.rb:280: warning: LoadError: load error: ./src/studio -- java.lang.IllegalStateException: Not on FX application thread; currentThread = main
<GGibson[m]> but I'm using run_later for the call it complains about
<byteit101[m]> are you in a callback?
<byteit101[m]> Oh, have you launched the application?
<GGibson[m]> no, not yet
<GGibson[m]> ok
<GGibson[m]> I think I see
<GGibson[m]> so, the param I pass launch does it get fed to initialize?
<GGibson[m]> or just calls stage
<GGibson[m]> ?
<byteit101[m]> It's weird, let me look up the docs
<GGibson[m]> thanks
<GGibson[m]> Are you looking for more contributors to jrubyfx? a Buddy of mine in europe is fantastic on java
<byteit101[m]> Sure?
<GGibson[m]> ok, I'll look into that
<byteit101[m]> However! I don't personally recommend that for ruby apps, instead just use ARGV
<byteit101[m]> Do nothing before you call App.launch, and consider the start method the main
<byteit101[m]> Or, use Constants/globals
<byteit101[m]> as params have to be strings
<GGibson[m]> If I can pass a string, I'm good
<GGibson[m]> I think I'm screwed: init takes no params, and start only takes one (the stage)
<byteit101[m]> correct, call params inside start (it's an instance method
<byteit101[m]> class App < JRubyFX::Application; def start(_); p params.raw; end; end; App.launch("hello")
<GGibson[m]> I'm not sure, in that case, how to direct the new window instance where to pick up its definition record then ... bummer
<byteit101[m]> OH!
<byteit101[m]> Do'nt do that
<GGibson[m]> ??
<byteit101[m]> You can only start one application
<GGibson[m]> not in init - I saw the warning
<GGibson[m]> ok
<GGibson[m]> so multiple windows is not supported?
<byteit101[m]> but the application can only have n windows
<byteit101[m]> Application != Stage(window)
<GGibson[m]> ok
<byteit101[m]> class App < JRubyFX::Application; def start(_); 5.times{|i| Stage.new.tap{|x|x.title=i.to_s}.show }; end; end; App.launch
<byteit101[m]> ^ Just tested
<byteit101[m]> I'd recommend you do all stuff inside the start method, and nothing outside. If you'd like, you can do a require './rest_of_code' inside start, and then put all the code in rest_of_code.rb
<GGibson[m]> I just tested it to
<GGibson[m]> excellent, that is good info
<GGibson[m]> ok
<GGibson[m]> Hey, thanks for your help. I think I am starting to get it now
<byteit101[m]> NP
<GGibson[m]> Hey! it works
<GGibson[m]> got a window to come up that is completely defined in a database structured record
<GGibson[m]> nice
<byteit101[m]> Nice!
<GGibson[m]> kinda worried though - looks like I get only ONE opportunity to define windows
<GGibson[m]> I would like to show/hide tool pallets
<byteit101[m]> No, you can define them whenever you want
<GGibson[m]> oh?
<GGibson[m]> outside of start()?
<byteit101[m]> Again: I recommend putting your main loop inside of start, but yes: class App < JRubyFX::Application; def start(_); 5.times{|i| Thread.new { sleep i; run_later { Stage.new.tap{|x|x.title=i.to_s}.show}} }; end; end; App.launch
<GGibson[m]> ok, I think I get it
<GGibson[m]> I can work with that
<byteit101[m]> In JavaFX, consider the "main" thread to be only useful for starting javafx, and nothing more :-)
<byteit101[m]> Like many GUI toolkits, it's heavily evented
eregon[m] has quit [Quit: Idle for 30+ days]
truths33ker[m] has joined #jruby
<truths33ker[m]> hi byteit101
<truths33ker[m]> I wanted to ask in which manner i could contribute to the project?
<truths33ker[m]> the jrubyxf project to be precize
<GGibson[m]> byteit101: truths33ker is the friend in Europe I spoke of
<GGibson[m]> btw: your tips helped me put up my very first windows last night
<GGibson[m]> success
<byteit101[m]> It's a mostly stable and minimal wrapper project at this point. The only excitement is going to be deleting some hacks once I finish https://github.com/jruby/jruby/pull/6422, but I know that right now, the jarify stuff is sketchy: https://github.com/jruby/jrubyfx/issues/118 Documentation for translation of javadoc=> our syntax could use some reference, but the biggest doc is jrubyfx's differences from java, such as
<byteit101[m]> injected @stage, etc: https://github.com/jruby/jrubyfx/issues/122 If you want to help with triage of issues, that might be helpful, but that might change siginificantly with my PR in JRuby proper. I'll try to push a branch with changes to support that soon if you want to do that (or help out testing). Another possibility: new helpers to make things less java-like but more ruby-like
<byteit101[m]> truths33ker: there's some ideas, I'm sure there are more if you are interested in a specific thing I haven't mentioned
<byteit101[m]> truths33ker: Ritght, jarify issue linked is going to be solved with the PR I think, scratch that one
<truths33ker[m]> I read your interesting reaction I wanted to say that i would like to start with software testing
<truths33ker[m]> at first
<byteit101[m]> Cool, of the existing code (don't test fxml) or post-pr code (fxml, mostly)?
<truths33ker[m]> understood
<byteit101[m]> Oh, I also have a thing importing all the rest of the classes sitting here not committed yet
ur5us has joined #jruby
<truths33ker[m]> oh sorry got a call
<byteit101[m]> Another idea: binding/observable api that is more rubyish, but that will probably require the PR to function well
<truths33ker[m]> sounds good I choose for the rubyfied method
<truths33ker[m]> thanks verry much
<byteit101[m]> As that sort of wordy math (high level) and class extension (low-level) aren't very rubyish
<truths33ker[m]> ow ok good to know
<byteit101[m]> another though: the {Tree,List,..}Cell extension is also not very rubyish, but I think that is probably harder to avoid
<byteit101[m]> *thought
ur5us has quit [Ping timeout: 260 seconds]