title: How to correctly update value of IntegerProperty in the view?
body: <p>I am building simple application that will track a certain tabletop game of 2 players.</p>
  
  <p>I have a view called <code>MatchView</code></p>
  
  <pre><code>class MatchView : View() {
  
      // data
      private var currentRound = SimpleIntegerProperty(0)
      private var currentTurn = SimpleIntegerProperty(0)
  
      override val root = borderpane {
          center = label(currentRound.stringBinding{ "Round %d".format(it) })
          // other layout-related stuff
          subscribe&lt;EndTurnEvent&gt; {
              endPlayerTurn()
          }
      }
  
      private fun endPlayerTurn() {
          // increment turn
          currentTurn.plus(1)
          currentRound.plus(currentTurn.value % 2)
      }
  }
  </code></pre>
  
  <p>that is subscribed to <code>EndTurnEvent</code> - event emitted by one of the fragments used by view.
  The called method is supposed to increment value of <code>currentTurn</code> and if needed <code>currentRound</code> (round increments after second player ends their turn)</p>
  
  <p>However neither the value of <code>currentRound</code> nor the one of <code>currentTurn</code> are getting increased when i call <code>.plus()</code> method.</p>
  
  <p>I have tried editting values differently :</p>
  
  <pre><code>private fun endPlayerTurn() {
      // increment turn
      currentTurn.value = currentTurn.value + 1
      currentRound.value = currentTurn.value % 2
  }
  </code></pre>
  
  <p>But this throws me <code>java.lang.IllegalStateException: Not on FX application thread</code></p>
  
  <p>I am aware that putting properties into views is anti-pattern, but since I just want to keep track of 2 properties, I thought I could put them directly into <code>View</code></p>