Copying NSTextStorage
Copying NSTextStorage
- Subject: Copying NSTextStorage
- From: Gordon Apple <email@hidden>
- Date: Thu, 29 May 2008 13:03:03 -0500
This used to work. No more. Has something changed in NSTextStorage?
In my Shape object, I have a dictionary of parameters, one being key =
"text" with value NSTextStorage*, similar to what is done in Sketch (without
the dictionary). My copyWithZone duplicated the dictionary and called
"copy" for each value. My "Duplicate" method simply used "[shape copy]" and
used to work. Now the only way I can get it to work is to intercept the
"text" key in Shape's copyWithZoneand and create a newly initialized
NSTextStorage object.
Apparently, NSTextStorage does not conform to NSCopying, even though its
superclass (NSAttributedString) does. Has something changed recently with
NSTextStorage that makes "copy" not work?
_______________________________________________
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