how can I set up my code so that I set up a listener on an integer variable, so that when the value changes (the value is binded to an object), the notification is called?
Thanks!
how can I set up my code so that I set up a listener
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot detect the change of a plain C variable.
You probably want to observe a change of an object’s internal state. If so, you should wrap the integer value into a property and use accessor methods to modify the value.
Changes to properties can be detected using Key Value Observing.