• 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: Challenge Chapter 8: sorting with key-path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Challenge Chapter 8: sorting with key-path


  • Subject: Re: Challenge Chapter 8: sorting with key-path
  • From: Alex Heinz <email@hidden>
  • Date: Wed, 23 Jul 2008 00:27:29 -0700

The only problem I can see is that you've spelled "personName.@length" incorrectly. Make sure it's spelled right and that should work.

(Another) Alex

On Jul 22, 2008, at 11:23 PM, Alexandre Badez wrote:

Hy,

I'm actually reading the "cocoa programming for Mac OS X (third edition)".

In chapter 8 we build an application witch display an array of object
with 2 properties (personName, expectedRaise).
We add sorting to the NSTableView using key: personName and selector:
"caseInsensitiveCompare:".

Now, for challenge, I try to sort the same column according to the
lenght of the personName.

I think that I should use the selectore "compare:" of NSNumber, but
what should be my key path for retrieving the lenght of the personName
?

I tried something like personName.@lenght (and @lenght.personName)
personName.lenght but none of them seems to work properly.

--
Alex

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Challenge Chapter 8: sorting with key-path (From: "Alexandre Badez" <email@hidden>)

  • Prev by Date: Re: Challenge Chapter 8: sorting with key-path
  • Next by Date: Re: SBApplication error with iTunes 7.7
  • Previous by thread: Re: Challenge Chapter 8: sorting with key-path
  • Next by thread: Checking for KVC compliancy
  • Index(es):
    • Date
    • Thread