• 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: Get the number of lines of text in an NSTextView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get the number of lines of text in an NSTextView?


  • Subject: Re: Get the number of lines of text in an NSTextView?
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 24 Jan 2006 15:28:15 -0800


On Jan 24, 2006, at 3:17 PM, Todd Ditchendorf wrote:

Dear list, How can you determine the total number of lines of text in an NSTextView?

I've looked in NSTextView, NSTextStorage, NSTextContainer, and NSAttributedString, but haven't yet noticed a method that looks like it will give me the information I'm looking for.

Anyone have any advice?


Different people mean different things when they speak of "lines of text". Some people are referring to runs separated by hard line breaks. Others are referring to lines of text displayed on the screen, i.e. as broken by layout to fit in the container. The Cocoa text system doesn't explicitly number either one, but it does have methods that will allow you to iterate over either one, which suffices to count them. Which were you referring to?


Douglas Davidson

_______________________________________________
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: 
 >Get the number of lines of text in an NSTextView? (From: Todd Ditchendorf <email@hidden>)

  • Prev by Date: Re: Get the number of lines of text in an NSTextView?
  • Next by Date: Re: Get the number of lines of text in an NSTextView?
  • Previous by thread: Re: Get the number of lines of text in an NSTextView?
  • Next by thread: Re: Get the number of lines of text in an NSTextView?
  • Index(es):
    • Date
    • Thread