August 2018
Beginner
178 pages
4h 56m
English
The observable function gives you a delegate property that accepts a function that will be invoked each time a property changes:
var observable by Delegates.observable(1) { prop, oldVal, newVal -> println("Observable property changed from $oldVal to $newVal")}
If we now change the property, the lambda function will be invoked:
//this prints Observable property changed from 1 to 0observable = 0
Read now
Unlock full access