Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34701

Re: JavaFX: Bindings, StringConverters, and ChangeListeners

Path csiph.com!news.mixmin.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!cache.uni-koblenz.de!not-for-mail
From Tassilo Horn <tsdh@gnu.org>
Newsgroups comp.lang.java.programmer
Subject Re: JavaFX: Bindings, StringConverters, and ChangeListeners
Date Thu, 23 Jun 2016 14:39:56 +0200
Organization University Koblenz-Landau Campus Koblenz
Lines 32
Message-ID <87y45wjcyr.fsf@gnu.org> (permalink)
References <87wplhbbvy.fsf@gnu.org> <dsvl9oFqvv4U1@mid.individual.net> <877fdgl87c.fsf@gnu.org> <dt203jFanfkU1@mid.individual.net>
NNTP-Posting-Host j289989.servers.jiffybox.net
Mime-Version 1.0
Content-Type text/plain
X-Trace cache.uni-koblenz.de 1466685596 15634 134.119.24.195 (23 Jun 2016 12:39:56 GMT)
X-Complaints-To news@cache.uni-koblenz.de
NNTP-Posting-Date Thu, 23 Jun 2016 12:39:56 +0000 (UTC)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
Cancel-Lock sha1:BwMGFIIyVX92pu0VdllVyMolj4k=
Xref csiph.com comp.lang.java.programmer:34701

Show key headers only | View raw


Nigel Wade <nmw@ion.le.ac.uk> writes:

>> Oh, flashing is actually a nice idea and can be done pretty easily
>> from my listener.
>
> A single flash. Not flashing.

Yes, now I'm flashing once and really like the effect.  And it's good
that I got my hands dirty with JavaFX animations thereby.

>> The problem is that I have no control over when and where the string
>> in the text field is parsed and converted to a number.  I just
>> specified a declarative binding between the text field's text
>> property and an integer property with a standart converter and
>> thereby gave up exact control over these things.  But bindings are
>> such an integral part of FX that I guessed there must be some
>> standart way to treat invalid input so that the binding's converter
>> doesn't err.
>>
>
> I don't understand what implications there are with JavaFX. A normal
> scenario with Java/Swing is to either check the user input when the
> field loses focus, is committed by key press (Return) or when the user
> indicates via some GUI element that the input is complete.

Yes, right.  But with JavaFX, once you have established a binding
between a UI input control and a property, the synchronization seems to
happen immediately, that is, it doesn't wait for a loss of focus or some
special confirmation like pressing enter.

Bye,
Tassilo

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-22 15:18 +0200
  Re: JavaFX: Bindings, StringConverters, and ChangeListeners Nigel Wade <nmw@ion.le.ac.uk> - 2016-06-22 15:22 +0100
    Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 08:39 +0200
      Re: JavaFX: Bindings, StringConverters, and ChangeListeners Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-23 09:59 +0000
        Re: JavaFX: Bindings, StringConverters, and ChangeListeners Nigel Wade <nmw@ion.le.ac.uk> - 2016-06-23 12:19 +0100
      Re: JavaFX: Bindings, StringConverters, and ChangeListeners Nigel Wade <nmw@ion.le.ac.uk> - 2016-06-23 12:39 +0100
        Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 14:39 +0200
  Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Douglas <e.d.programmer@gmail.com> - 2016-06-22 08:06 -0700
    Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 08:45 +0200
      Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Douglas <e.d.programmer@gmail.com> - 2016-06-23 05:11 -0700
        Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-23 08:22 -0400
          Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 15:12 +0200
            Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-23 10:56 -0400

csiph-web