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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to