FROM : Gordon Apple
DATE : Thu May 29 20:03:03 2008
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?
DATE : Thu May 29 20:03:03 2008
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?
| Related mails | Author | Date |
|---|---|---|
| Gordon Apple | May 29, 20:03 | |
| Jens Alfke | May 30, 06:53 | |
| Gordon Apple | May 30, 17:13 | |
| Kyle Sluder | May 30, 22:16 | |
| Gordon Apple | Jun 1, 01:49 | |
| Ross Carter | Jun 1, 17:59 | |
| Gordon Apple | Jun 3, 17:15 | |
| Kyle Sluder | Jun 3, 18:51 | |
| Ross Carter | Jun 3, 20:19 | |
| Kyle Sluder | Jun 3, 22:21 | |
| Alastair Houghton | Jun 4, 00:09 | |
| Sherm Pendley | Jun 4, 10:14 |






Cocoa mail archive

