FROM : Hamish Allan
DATE : Tue May 20 01:30:50 2008
On Tue, May 20, 2008 at 12:16 AM, Christiaan Hofman <<email_removed>> wrote:
> Basically what mmalc is saying (as I understand it) is to /add/ a property
> for this derived key, and when the "real" keys update (i.e. from
> observeValue:...) you set the derived property using KVC compliant methods,
> so the change is noted. It's rather a hassle and needs extra ivars.
No need for extra ivars -- the sum total is a dynamic read-only
property, dependent on the filtered collection of topics. If the
dependency is set up using KVO, anything observing the sum total (e.g.
a text view in the user interface) will be notified that it has
changed when the filtered collection is changed. Likewise, the
filtered collection is a read-only property dependent on the value of
the search field, so typing in the search field will indirectly cause
a notification that the sum total has changed.
Hamish
DATE : Tue May 20 01:30:50 2008
On Tue, May 20, 2008 at 12:16 AM, Christiaan Hofman <<email_removed>> wrote:
> Basically what mmalc is saying (as I understand it) is to /add/ a property
> for this derived key, and when the "real" keys update (i.e. from
> observeValue:...) you set the derived property using KVC compliant methods,
> so the change is noted. It's rather a hassle and needs extra ivars.
No need for extra ivars -- the sum total is a dynamic read-only
property, dependent on the filtered collection of topics. If the
dependency is set up using KVO, anything observing the sum total (e.g.
a text view in the user interface) will be notified that it has
changed when the filtered collection is changed. Likewise, the
filtered collection is a read-only property dependent on the value of
the search field, so typing in the search field will indirectly cause
a notification that the sum total has changed.
Hamish






Cocoa mail archive

