• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: arrayController setSortDescriptors: problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >arrayController setSortDescriptors: problem (From: david kiers <email@hidden>)

  • Prev by Date: Re: Releasing an unretained menu item?
  • Next by Date: Re: Having issues with a custom class
  • Previous by thread: Re: arrayController setSortDescriptors: problem
  • Next by thread: Having issues with a custom class
  • Index(es):
    • Date
    • Thread