I have following code
nextBTN.setOnClickListener {
if (validateInfo()) {
(activity).apply {
next(1)
user.let {
it.firstName = userName.text.toString()
it.lastName = lastName.text.toString()
it.email = email.text.toString()
it.password = password.text.toString()
}
}
}
Now for the fist time it works fine like
email.text.toString() == n@n.com
but when i try this second time and if i change the value on email edit text field to n11@n.com the email will be same
email.text.toString() == n@n.com
i know it works when i give the this@reference
to main class. but wants to learn why is this not working