Re: NSSecureCoding & NSAttributedString

2018-02-18 Thread Markus Spoettl
On 2/18/18 06:12, Quincey Morris wrote: On Feb 17, 2018, at 20:34 , Glenn L. Austin wrote: Or encode/decode them using Coding, then encode/decode the resulting encoded attributed string data using SecureCoding. Markus already said that archives exist with normally-encoded attributed strings

Re: NSSecureCoding & NSAttributedString

2018-02-18 Thread Quincey Morris
On Feb 18, 2018, at 10:30 , Markus Spoettl wrote: > > The decoder isn't terribly concerned with where the individual classes will > occur, just that they might. I was going to reply that it’s stupid that it behaves like this, but I guess it makes some sense after all. The secure coding protect

Re: NSSecureCoding & NSAttributedString

2018-02-18 Thread Markus Spoettl
On 2/18/18 22:02, Quincey Morris wrote: On Feb 18, 2018, at 10:30 , Markus Spoettl > wrote: The decoder isn't terribly concerned with where the individual classes will occur, just that they might. I was going to reply that it’s stupid that it behaves like this

Re: NSSecureCoding & NSAttributedString

2018-02-18 Thread Quincey Morris
On Feb 18, 2018, at 14:01 , Markus Spoettl wrote: > > Arrays are easy to enforce but dictionaries are really a weak spot. For > starters you can't define which classes are acceptable as keys and which as > values. What if you have collection classes as values, what layout is > acceptable in s

Re: NSSecureCoding & NSAttributedString

2018-02-18 Thread Markus Spoettl
On 2/18/18 23:01, Markus Spoettl wrote: As for additional NSAttributeString "companion" classes, I'm still open for suggestions. Sure enough I found other pulprits: NSTextList and NSShadow. According to the header, NSTextList does not conform to NSSecureCoding, yet this works (don't know why

Re: NSSecureCoding & NSAttributedString

2018-02-18 Thread Quincey Morris
On Feb 18, 2018, at 14:27 , Markus Spoettl wrote: > > yet this works (don't know why) I did this in Swift (so I could use a playground): > print (NSTextTab.self.conforms (to: NSSecureCoding.self)) // true > print (NSTextList.self.conforms (to: NSSecureCoding.self)) // true > print (NSShadow.sel

Re: NSSecureCoding & NSAttributedString

2018-02-18 Thread Gary L. Wade
FYI, you can define your own attributes using your own keys and values not defined by the frameworks, and the frameworks will ignore them from the standpoint of drawing. In one app, I used an attribute to add a time stamp to a run of text and overrode the glyph drawing so that when my code saw t