Observable properties

suggest change
var foo : Int by Delegates.observable("1") { property, oldValue, newValue ->
    println("${property.name} was changed from $oldValue to $newValue")
}
foo = 2

The example prints foo was changed from 1 to 2

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents