SimpleIntegerProperty is not a Property<Integer>

Michael Paus mp at jugs.org
Wed Feb 15 16:19:43 UTC 2017


I am also wondering why this has to be so inconsistent.
Just in case you didn't know.

You can say
         p = s.asObject();
in your example.

LG, Michael

Am 15.02.17 um 16:59 schrieb Jens Auer:
> Hi,
>
> I am wondering why SimpleIntegerProperty implements only Property<Number> and not Property<Integer>. This came up while using ReactFx where I tried to bind a Var<Integer> to a SimpleIntegerProperty and it fails to compile:
> SimpleIntegerProperty s = null;
>
> Var<Integer> v=null;;
> v.bindBidirectional(s);
>
> It turns out that this is due to the inheritance hierarchy and it also prevents code like
> javafx.beans.property.Property<Integer> p;
> javafx.beans.property.SimpleIntegerProperty s;
>
> p = s;
>
> Cheers,
> Jens
>
> Jens Auer
> (Softwareentwicklung)
> ___________________________________________________________
> Unternehmensberatung H & D GmbH
> Niederlassung Weißenthurm
> Werftstr. 5 - 56575 Weißenthurm
> Tel.:            02637/94238 -110
> Fax:            02637/94238 -149
> michael.zimmer at h-d-gmbh.de<mailto:michael.zimmer at h-d-gmbh.de>
> http://www.h-d-gmbh.de<http://www.h-d-gmbh.de/>
> http://www.h-d-gmbh.de/impressum.html
> ___________________________________________________________
>



More information about the openjfx-dev mailing list