• 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
Calculating paragraph numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calculating paragraph numbers


  • Subject: Calculating paragraph numbers
  • From: Mark Alldritt <email@hidden>
  • Date: Wed, 28 Jan 2004 23:00:34 -0800

Hi All,

I'm trying to figure out how I can calculate the paragraph number of the
current selection in a text view. I've studied the code on
http://developer.apple.com/documentation/Cocoa/Conceptual/TextLayout/Tasks/C
ountLines.html, but it suggests that I iterate over the entire text to count
the lines. Is there some way to get this information directly? Otherwise,
I can see this getting slower and slower as the length of text grows.

Cheers
-Mark

---------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 333 Moss Street
FAX: 250-383-3204 Victoria, B.C.
WEB: http://www.latenightsw.com/ CANADA V8V-4M9
AIM: markalldritt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Calculating paragraph numbers
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Controlling control positions and size in a window
  • Next by Date: Re: selecting a single cell in NSTableView?
  • Previous by thread: Re: Controlling control positions and size in a window
  • Next by thread: Re: Calculating paragraph numbers
  • Index(es):
    • Date
    • Thread