Re: NSArrayController filterPredicate not truly observable
Re: NSArrayController filterPredicate not truly observable
- Subject: Re: NSArrayController filterPredicate not truly observable
- From: Matt Neuburg <email@hidden>
- Date: Tue, 18 Jul 2006 17:16:24 -0700
- Thread-topic: NSArrayController filterPredicate not truly observable
On Tue, 18 Jul 2006 15:12:29 -0700, Ken Victor <email@hidden> said:
>according to the documentation for NSArrayController filterPredicate:
>
>filterPredicate
>Returns the predicate used by the receiver to filter the array
>controller contents.
>- (NSPredicate *)filterPredicate
>Return Value
>The predicate used by the receiver to filter the array controller
>contents. Returns nil if no filter predicate is set.
>Discussion
>This property is observable using key-value observing.
>
>my observer is setup as follows:
>
>[arrayController addObserver: self forKeyPath: @"filterPredicate"
>options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld
>context: nil];
>
>yet, when i examine the change dictionary in my
>observeValueForKeyPath:ofObject:change:context: method, both the old
>and new values are CFNull objects.
>
>is this to be expected? if not, is this a known bug? (if not, i'll report it).
It's a known bug, but you should report it anyway! The more the merrier.
The only reason I know anything about this is that I got it wrong myself
just last week:
<http://www.cocoabuilder.com/archive/message/cocoa/2006/7/14/167630>
Earlier in that thread I adumbrate another approach (a notification from the
controller). And still another might be to use bind:... instead of
addObserver:... m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden