Re: NSTextView causes lockups when appending too quickly and/or scrolling
Re: NSTextView causes lockups when appending too quickly and/or scrolling
- Subject: Re: NSTextView causes lockups when appending too quickly and/or scrolling
- From: Steven Moore <email@hidden>
- Date: Thu, 5 Jun 2008 14:40:00 -0700
Heh, whoops. Maybe I should read the documentation better. The warning
is already there, I just missed it:
"NSTextStorage also defines a set of methods ... useful for getting
and setting scriptable properties of NSTextStorage objects... In
particular, using thecharacters, words or paragraphs methods or their
corresponding setter methods is an inefficient way to manipulate the
text storage, since these methods create and return many objects."
-Steven
On Jun 4, 2008, at 4:04 PM, Douglas Davidson wrote:
Anything in NSTextStorageScripting.h (like -paragraphs) is really
intended for scripting only; stay away from it for other purposes.
You should file a bug against the documentation to include a warning
to that effect. If you want to go through text by paragraphs, you
should use [[textStorage string] paragraphRangeForRange:] or related
methods.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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