Re: Get the number of lines of text in an NSTextView?
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