<GGibson[m]> byteit101: I intend to alter window widgets dynamically by script. show/hide/create/destroy ... etc
<GGibson[m]> does jrubyfx support this way of doing things?
<byteit101[m]> G. Gibson: yes, just call show/hide/new/set to null ... etc
_whitelogger has joined #jruby
<GGibson[m]> So, I'm attempting to make the gui toolkit do what a web-client DOM would do
<GGibson[m]> but I want to use the dsl to do it, not fxml
<byteit101[m]> >does that work w/ this gem?
<byteit101[m]> This gem is a very thin helper framework, so the answer to those sort of questions is the answer to "does that work w/ javafx?"
<byteit101[m]> >but I want to use the dsl to do it, not fxml
<byteit101[m]> Ah, there are actually 3 things, and they are not orthogonal. You can use both the dsl and fxml, as well as neither the dsl, nor fxml.
<byteit101[m]> The third is the Java api directly
<byteit101[m]> the dsl is the Java API + predictable ruby transforms
<byteit101[m]> fxml can *only* be used to create scenegraphs, it can't be used to edit them, or do exciting things
<byteit101[m]> fxml is technically a restricted dsl on the java API
<byteit101[m]> ex: `button(text: "foo")` is the ruby DSL, `b = Button.new; b.text = "foo"` is the java API, and for completeness, `<Button text="foo" />` is the fxml DSL
<byteit101[m]> Anything in either the fxml DSL or the Ruby DSL can be expressed in the Java API, but not the reverse
<byteit101[m]> But to answer your original question:
<byteit101[m]> >I also want to send a new widget to replace an old one --- does that work w/ this gem?
<byteit101[m]> Yes, just do parent.children.set_all(new_child)
<GGibson[m]> right
<byteit101[m]> (or parent.right, or parent.node, or whatever the parent container has)
<GGibson[m]> I'm done coding for the day, but I'll bear that in mind moving forward
<byteit101[m]> > So, I'm attempting to make the gui toolkit do what a web-client DOM would do
<byteit101[m]> Note, if you actually want to use the web dom: https://docs.oracle.com/javafx/2/api/javafx/scene/web/WebView.html
<GGibson[m]> thanks
<GGibson[m]> I am developing a framework that runs on the desktop as well as the web
<GGibson[m]> I use Opal on the web, so I can code in ruby
<GGibson[m]> so, if I can do with window widgets what I can do with html/dom -- I'm golden
ur5us has joined #jruby
ur5us has quit [Ping timeout: 260 seconds]
johnphillips3141 has quit [Quit: Idle for 30+ days]
Antiarc has quit [Ping timeout: 265 seconds]
Antiarc has joined #jruby
Caerus has quit [Ping timeout: 260 seconds]
Caerus has joined #jruby
Caerus has quit [Ping timeout: 246 seconds]
Caerus has joined #jruby
<GGibson[m]> byteit101: Something odd is happening. Do you have a sec?
<GGibson[m]> I made a class called ::Core < JRubyFX::Application. I do a launch in its own thread, but it only displays my window *after* I tell it to 'stop'
<GGibson[m]> then it runs ... very strange
ur5us has joined #jruby
<byteit101[m]> G. Gibson: I'm fairly sure you have to launch in the main thread
<byteit101[m]> But that's a very odd behavior indeed
<GGibson[m]> I really have to get other work done in the main thread post-launch
<GGibson[m]> should I create an issue ticket or feature request?
<GGibson[m]> I'll see if I can work around it
<byteit101[m]> > I really have to get other work done in the main thread post-launch
<byteit101[m]> That isn't supported by javafx, and there isn't a way to work around that in jrubyfx
<byteit101[m]> If you spawn off a thread before you launch, or inside the start method, you should be good
<GGibson[m]> Well, that's what I tried the first time. I tried launching from main, and doing other work in a separate thread ... but the issue remains: it will only display the window after being stopped.
<GGibson[m]> I'm still scratching my head on that one
<GGibson[m]> So this is what I'm attempting:
<GGibson[m]> now, I have to hit ctrl-c and THEN it opens the window specified and runs fine
<GGibson[m]> it only fires up the window after stop is called.
<GGibson[m]> So, I've done all I know how to do here -- not sure what next to try.
<GGibson[m]> I did try to close the passed primaryStage object but that didn't work either
joast has quit [Quit: Leaving.]
joast has joined #jruby