Re: Doesn't -sortedArrayUsingDescriptors: use KVC accessors?
Re: Doesn't -sortedArrayUsingDescriptors: use KVC accessors?
- Subject: Re: Doesn't -sortedArrayUsingDescriptors: use KVC accessors?
- From: Greg Herlihy <email@hidden>
- Date: Tue, 21 Mar 2006 23:49:25 -0800
- Thread-topic: Doesn't -sortedArrayUsingDescriptors: use KVC accessors?
Did you remember to provide both the get and the "set" accessor method for
each attribute? KVO ignores a get accessor method unless a corresponding
"set" accessor method is also implemented (note that the "set" method merely
has to exist, and can in fact do nothing).
Greg
On 3/21/06 8:35 PM, "Jerry Krinock" <email@hidden> wrote:
> I decided to rewrite my code using NSArrayController, but still the result
> is the same...it seems to use NSMutableDictionary's -objectForKey, instead
> of my beautiful KVC-compliant "accessor" methods.
>
> I suppose I could work around this by kludging my own "compare" selector in
> my NSSortDescriptor, but I'd just like some confirmation that I'm not making
> some other stupid mistake before I do something which seems SOOOOO UN-COCOA!
>
> My objects are not instances of a clean, stand-alone class, but are instead
> NSMutableDictionaries, and my "accessor" methods in a category. Is this the
> problem? (A couple months ago I tried to subclass NSMutableDictionary, but
> we know that don't work.)
>
> Jerry
>
>
> _______________________________________________
> 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
_______________________________________________
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