You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldnt find it in the guide, but bassicaly if I have some constraints (like String should only contain lowercase letters) I would check them in the setters and if something is wrong I can throw an Exception, display an Alert, return from the setter without setting anything or whatever. But in tornadofx I dont have var+setters but instead I have val properties like SimpleStringProperty. So what should I do? One idea is to somehow check this in .onChange{} but the problems I see with it is that this happens after the change (what if someone else also listens to the change and does something before I can check the constraint, also how do I get my old value back?). What is the intended way to do this?
The text was updated successfully, but these errors were encountered:
I couldnt find it in the guide, but bassicaly if I have some constraints (like String should only contain lowercase letters) I would check them in the setters and if something is wrong I can throw an
Exception
, display anAlert
,return
from the setter without setting anything or whatever. But in tornadofx I dont havevar
+setters but instead I haveval
properties likeSimpleStringProperty
. So what should I do? One idea is to somehow check this in.onChange{}
but the problems I see with it is that this happens after the change (what if someone else also listens to the change and does something before I can check the constraint, also how do I get my old value back?). What is the intended way to do this?The text was updated successfully, but these errors were encountered: