Re: Copying NSTextStorage
Re: Copying NSTextStorage
- Subject: Re: Copying NSTextStorage
- From: Alastair Houghton <email@hidden>
- Date: Tue, 3 Jun 2008 23:09:23 +0100
On 3 Jun 2008, at 19:19, Ross Carter wrote:
First I will echo what Jens has said: there's a strong probability
that NSAttributedString or NSMutableAttributedString will do what
need. NSTextStorage adds two capabilities to
NSMutableAttributedString: it communicates with one or more
NSLayoutManagers that are involved in laying out the attributed
string in one or more NSTextContainers, and it supports some
scripting commands.
I think it also uses a different internal representation (probably a
gap buffer) so that it can efficiently support editing. My guess is
that NSTextStorage is therefore a somewhat more expensive object to
throw around than an NS[Mutable]AttributedString, but that it will be
more efficient if e.g. you want to write a text editor.
The notion of copying an NSTextStorage object does not make much
sense to me.
Well I think it does make sense in that I don't see why you
*shouldn't* be able to copy one. That's not to say that I think it's
something that most applications would do on a regular basis though.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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