• 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: Sorting numerical strings in a table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting numerical strings in a table


  • Subject: Re: Sorting numerical strings in a table
  • From: "I. Savant" <email@hidden>
  • Date: Sun, 4 Feb 2007 22:45:49 -0500


How about using a custom NSFormatter?

--
I.S.


On Feb 4, 2007, at 10:29 PM, Koen van der Drift wrote:

Hi,

One of the colums in a NSTableView that I populate through bindings should display an NSString indicating a range: @"1-10", @"2-34", etc. I simply create the strings from an NSRange ivar. Right now I just display the first number (int firstNumber = myRange.location + 1), and bind the column header to that value. Sorting works as expected. However, I would rather have the string with the range be visible in the column, but then (when I bind to the string) sorting doesn't work.

Is there a way to accomplish this?

thanks,

- Koen.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40gmail.com


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Sorting numerical strings in a table
      • From: Brian Smith <email@hidden>
References: 
 >Sorting numerical strings in a table (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Sorting numerical strings in a table
  • Next by Date: Controlling RAW Camera file conversion in NSImage
  • Previous by thread: Sorting numerical strings in a table
  • Next by thread: Re: Sorting numerical strings in a table
  • Index(es):
    • Date
    • Thread