// create an event source val clicks = EventSource[Unit] // setup a button to fire events button <~ On.click(Ui(clicks.fire(()))) // a more useful event stream val randomInts = clicks.map(_ ⇒ scala.util.Random.nextInt().toString) // the caption will update with each button click textView <~ randomInts.map(text)