• 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
alphabetical sorting, and line breaks in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

alphabetical sorting, and line breaks in NSTextView


  • Subject: alphabetical sorting, and line breaks in NSTextView
  • From: email@hidden
  • Date: Wed, 28 Jun 2006 08:28:49 +0200 (CEST)
  • Importance: Normal

               Hello all,


  I'm trying to add "alphabetical sorting of lines" (as in TextWrangler) in
my  NSDocument&NSTextView-based Cocoa app. A first step would be to create
a function sortAlphabetically that takes an NSString, scans it using "\n"
as a separator
and sorts the lines : e.g.

   sortAlphabetically(@"noun\nzoo\nadder\nvoid")=@"adder\nnoun\nvoid\nzoo"

 The problem is, not all line breaks are like this;
most of them are made automatically by the application when the end of the
line is reached on the current UI. How does the NSTextView architecture
keep track
of those other line breaks ?

                                                                               Ewan



 _______________________________________________
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

  • Follow-Ups:
    • Re: alphabetical sorting, and line breaks in NSTextView
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Executing non objective-c code in a loaded bundle
  • Next by Date: calling nibtool in Objective-C code ?
  • Previous by thread: Re: Store file properties alongside coredata?
  • Next by thread: Re: alphabetical sorting, and line breaks in NSTextView
  • Index(es):
    • Date
    • Thread