Re: arrayController setSortDescriptors: problem
Re: arrayController setSortDescriptors: problem
- Subject: Re: arrayController setSortDescriptors: problem
- From: Keith Renz <email@hidden>
- Date: Wed, 2 Mar 2005 10:20:46 -0500
On Mar 2, 2005, at 1:23 AM, david kiers wrote:
NSArray *descript = [[NSArray arrayWithObject:[[NSSortDescriptor alloc]
initWithKey:@"deadLine" ascending:YES selector:@selector(compare:)]]autorelease];
In the above line of code, you're auto-releasing an already auto-released array. You meant to auto-release the sort descriptor, not the array, and placed the "autorelease" after the wrong bracket. It should look like this:
NSArray *descript = [[NSArray arrayWithObject:[[NSSortDescriptor alloc]
initWithKey:@"deadLine" ascending:YES selector:@selector(compare:)] autorelease
]];
Keith
_______________________________________________
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