• 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: 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
References: 
 >arrayController setSortDescriptors: problem (From: david kiers <email@hidden>)
 >Re: arrayController setSortDescriptors: problem (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: arrayController setSortDescriptors: problem
  • Next by Date: connecting custom formatter to tableView column
  • Previous by thread: Re: arrayController setSortDescriptors: problem
  • Next by thread: Re: arrayController setSortDescriptors: problem
  • Index(es):
    • Date
    • Thread