Skip to content

Instantly share code, notes, and snippets.

@husaynhakeem
Created February 4, 2018 23:46
Show Gist options
  • Save husaynhakeem/4189781dcb9124ca4e197603377edea7 to your computer and use it in GitHub Desktop.
Save husaynhakeem/4189781dcb9124ca4e197603377edea7 to your computer and use it in GitHub Desktop.
var observableData: String by Delegates.observable("Initial value") {
property, oldValue, newValue ->
println("${property.name}: $oldValue -> $newValue")
}
fun main(args: Array<String>) {
observableData = "New value"
observableData = "Another value"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment