Re: arrayController setSortDescriptors: problem
Re: arrayController setSortDescriptors: problem
- Subject: Re: arrayController setSortDescriptors: problem
- From: david kiers <email@hidden>
- Date: Wed, 2 Mar 2005 08:25:17 +0100
Ah yes, never nest further then you can count brackets.
Thanks Andrew!
Best,
David
On Mar 2, 2005, at 8:05 AM, Andrew Merenbach wrote:
Hello, David. It appears that your autorelease is misplaced. Looking
at the nesting of your line declaring the NSArray *descript, it
appears that the array is being created autoreleased already (since
you are using the much-simpler arrayWithObject: instead of alloc and
initWithObjects:count: or another init: alternative). The
NSSortDescriptor that you are creating, however, should be released
somewhere, and I suspect that that's what you meant to do. Something
like:
NSArray *descript = [NSArray arrayWithObject:[[NSSortDescriptor alloc]
initWithKey:@"deadLine" ascending:YES selector:@selector(compare:)]
autorelease]];
[arrayController setSortDescriptors:descript];
should do the trick, but this is composed in Mail.app. Conceptually,
you appear to have no true problems besides this little one.
Cheers!
Andrew
_______________________________________________
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