edvin
04/28/2017, 12:46 PMgtnarg
04/28/2017, 12:46 PMthomasnield
04/28/2017, 12:47 PMedvin
04/28/2017, 12:47 PMthomasnield
04/28/2017, 12:47 PMedvin
04/28/2017, 12:47 PMthomasnield
04/28/2017, 12:48 PMedvin
04/28/2017, 12:48 PMthomasnield
04/28/2017, 12:51 PMthomasnield
04/28/2017, 12:52 PMedvin
04/28/2017, 12:52 PMedvin
04/28/2017, 1:00 PMui
and async
is fun:thomasnield
04/28/2017, 1:01 PMedvin
04/28/2017, 1:05 PMedvin
04/28/2017, 1:06 PMhello
function is actually private. The only way to access it is via the helloCommand
, which turns the action into a command, and configures it to always run on the UI thread.edvin
04/28/2017, 1:07 PMSay hello
button is configured to execute this action, and it also binds it's commandParameterProperty
to the String you can edit in the TextField.edvin
04/28/2017, 1:08 PMCall action off of UI thread
however, does an explicit execute
on the helloCommand
and passes in a parameter directly. This call is fired off of the UI thread, but the hello
action will still fire on the UI thread because of the ui = true
parameter passed to the Command()
constructor.edvin
04/28/2017, 1:08 PMui = true
and hit the Call action off of UI thread
button, you will get an error say that you can't show the Alert because you're not on the JavaFX Application Thread.edvin
04/28/2017, 1:08 PMedvin
04/28/2017, 1:10 PMcommand<String> { println...
of course.edvin
04/28/2017, 1:16 PMedvin
04/28/2017, 1:21 PMedvin
04/28/2017, 1:27 PMedvin
04/28/2017, 1:35 PMedvin
04/28/2017, 1:37 PMedvin
04/28/2017, 1:39 PMedvin
04/28/2017, 1:40 PMcommandParameterProperty
binding can be swapped for commandParameter = some value
if you have a static value for the parameter. You could even pass it a property, so the input can change even without a binding.edvin
04/28/2017, 1:55 PM