Re: Copying NSTextStorage
Re: Copying NSTextStorage
- Subject: Re: Copying NSTextStorage
- From: Jens Alfke <email@hidden>
- Date: Thu, 29 May 2008 21:53:58 -0700
On 29 May '08, at 11:03 AM, Gordon Apple wrote:
Apparently, NSTextStorage does not conform to NSCopying, even
though its
superclass (NSAttributedString) does. Has something changed
recently with
NSTextStorage that makes "copy" not work?
Is there a reason you need to use NSTextStorage instead of
NSAttributedString? Generally the only place NSTextStorage is used is
in the innards of NSTextViews.
I'm not sure what -copy would do with an NSTextStorage, since it
inherits from NSMutableAttributedString, and copying an
NSMutableAttributedString returns an NSAttributedString. In other
words, copying mutable objects returns immutable ones. Have you tried
using -mutableCopy instead?
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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