FROM : Scott Stevenson
DATE : Mon May 19 08:42:46 2008
On May 18, 2008, at 8:04 PM, David Dunham wrote:
> I've got a key which is calculated (it's the number of topics which
> are filtered by a search string). As the user types into a search
> field, I need to update this derived value. How else can I let KVO
> know the calculated value has changed, so it can be displayed in the
> UI?
In general, you can just set derived keys to be dependent on the
"real" key, and the change notifications happen automatically. On
Tiger, you use +setKeys:triggerChangeNotificationsForDependentKey: in
+initialize.
Are you able to use this?
- Scott
DATE : Mon May 19 08:42:46 2008
On May 18, 2008, at 8:04 PM, David Dunham wrote:
> I've got a key which is calculated (it's the number of topics which
> are filtered by a search string). As the user types into a search
> field, I need to update this derived value. How else can I let KVO
> know the calculated value has changed, so it can be displayed in the
> UI?
In general, you can just set derived keys to be dependent on the
"real" key, and the change notifications happen automatically. On
Tiger, you use +setKeys:triggerChangeNotificationsForDependentKey: in
+initialize.
Are you able to use this?
- Scott






Cocoa mail archive

