How do I change the value of a ValueModel without triggering any updates?
• By using setValue: newValue method instead of value: newValue method. setValue: method replaces the value instance variable without sending update messages to dependents. • Remove the DependencyTransformer from the ValueModel’s dependents. Send retractInterestsFor: anObject message to the ValueModel. This is done just prior to sending value: newValue message. Using setValue: disallows all updates. retractInterestsFor: only disallows a specific update, allowing all others to proceed.
Ans. 1. By using setValue: newValue method instead of value: newValue method. setValue: method replaces the value instance variable without sending update messages to dependents. 2. Remove the DependencyTransformer from the ValueModel’s dependents. Send retractInterestsFor: anObject message to the ValueModel. This is done just prior to sending value: newValue message. Using setValue: disallows all updates. retractInterestsFor: only disallows a specific update, allowing all others to proceed.
Related Questions
- Rateable Value Q: A premises has 50% of their rateable value waived as a charitable organisation. How should the applicant calculate the rateable value of the premises for conversion purposes?
- Can CertifiedREI help me understand if updates and additions to my house will increase my property value?
- How do I change the value of a ValueModel without triggering any updates?