Appending text to textview
There's a button with the following onClick event:
fun add(view: View) {
txt.append((view as Button).text)
}
But I get an error on using += operator.
fun add(view: View) {
txt.text += (view as Button).text //error
}
What's wrong with the second code?