Re: [jruby-user] JRubyFX

Thomas E Enebo <[email protected]> Wed, 29 Apr 2015 13:20:49 -0500
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CAL5zZVmX+-n+6P_1x3eSCq6-DnSY5pRx_auA8=FaCuOAd_Wm5g@mail.gmail.com>
--001a11c36034e1c3d00514e1099b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

javafx.beans.value.ChangeListener is an interface so with implicit closure
coercion you should be able to:


```ruby
This.engine.load_worker.state_property.add_listener do |observable,
old_value, new_value|
  #...
end
```

-Tom


On Wed, Apr 29, 2015 at 11:42 AM, Rodrigo Botafogo <
[email protected]> wrote:

> Hello....
>
> Sorry if this isn=C2=B4t the right place to post questions about JRubyFX.
>
> I=C2=B4m trying to write a JRubyFX application.  I=C2=B4m following a pos=
t from
> Oracle to try to learn JavaFX and JRubyFx.  In the post, in a js file the=
re
> is the following lines:
>
>  // Complete initialization when page is loaded.
>   This.engine.loadWorker.stateProperty().addListener(new ChangeListener()=
 {
>
>
> ChangeListener() is not found when I run the application.  I understand
> that I should load javafx/beans, but I don=C2=B4t know how to do this wit=
h
> JRubyFX.  Can anybody help me here or point to the right list to ask this
> question?
>
> Thanks
> --
> Rodrigo Botafogo
>
>
>
>


--=20
blog: http://blog.enebo.com       twitter: tom_enebo
mail: [email protected]

--001a11c36034e1c3d00514e1099b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>javafx.beans.value.ChangeListener is an int=
erface so with implicit closure coercion you should be able to:<br></div><d=
iv><br><br></div>```ruby<br></div>This.engine.load_worker.state_property.ad=
d_listener do |<code>observable, old_value, new_value|<br>=C2=A0 #...<br></=
code></div><code>end<br></code><div><div>```<br><br></div><div>-Tom<br><br>=
</div></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"=
>On Wed, Apr 29, 2015 at 11:42 AM, Rodrigo Botafogo <span dir=3D"ltr">&lt;<=
a href=3D"mailto:[email protected]" target=3D"_blank">rodrigo@rod=
rigobotafogo.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr">Hello....=C2=A0<div><br></div><div>Sorry if this isn=C2=B4t =
the right place to post questions about JRubyFX. =C2=A0</div><div><br></div=
><div>I=C2=B4m trying to write a JRubyFX application.=C2=A0 I=C2=B4m follow=
ing a post from Oracle to try to learn JavaFX and JRubyFx.=C2=A0 In the pos=
t, in a js file there is the following lines:</div><div><br></div><div><pre=
 style=3D"margin-top:10px;margin-bottom:10px;color:rgb(85,85,85);font-size:=
12px;line-height:18px"> // Complete initialization when page is loaded.
  This.engine.loadWorker.stateProperty().addListener(new ChangeListener()=
=C2=A0{</pre><pre style=3D"margin-top:10px;margin-bottom:10px;color:rgb(85,=
85,85);font-size:12px;line-height:18px"><br></pre><div>ChangeListener() is =
not found when I run the application.=C2=A0 I understand that I should load=
 javafx/beans, but I don=C2=B4t know how to do this with JRubyFX.=C2=A0 Can=
 anybody help me here or point to the right list to ask this question?</div=
><div><br></div><div>Thanks</div><span class=3D"HOEnZb"><font color=3D"#888=
888">-- <br><div><div dir=3D"ltr">Rodrigo Botafogo<div><br><br><div><br></d=
iv></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear=3D"all"><br>-- <br><div class=3D"gmail_sig=
nature">blog: <a href=3D"http://blog.enebo.com" target=3D"_blank">http://bl=
og.enebo.com</a>=C2=A0 =C2=A0 =C2=A0=C2=A0 twitter: tom_enebo<br>mail: <a h=
ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a=
></div>
</div>

--001a11c36034e1c3d00514e1099b--