Dealing with nested events for a single property in JavaFX
tbee at tbee.org
Thu Jun 21 23:01:36 PDT 2012
Are we maybe barking up the wrong tree? Isn't the problem at hand better solved by not having the event in the first place? The "change it back to something that is valid" to me sounds like a very wrong approach; shouldn't it have been checked before hand? Or maybe the focus should have never left the old node?
On 2012-06-22 00:39, Jonathan Giles wrote:
> Saying that you should error out when someone tries to update a property in the event callback is also wrong, I think. There are legitimate use cases, for example as a last ditch form of validation: if the value is outside the allowable range, change it back to something that is valid. Alternatively, when focus is given to a node, request a focus change on another node. I imagine our own code would blow up if we took this approach :-)
More information about the openjfx-dev