title: Binding NSAttributedString and NSTextView
body: <p>I am trying to follow an example from a book where there is an <code>NSTextView</code> in the interface that should be bound to an <code>NSAttributedString</code> in the controller class. I have the string in an attribute called text and I bind the text view to the File Owner's <code>self.text.</code> As far as I can see, that is what the book tells me to do.</p>
  
  <p><a href="https://i.stack.imgur.com/R90RG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R90RG.png" alt="NSAttributed string attribute."></a></p>
  
  <p><a href="https://i.stack.imgur.com/YNlh5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YNlh5.jpg" alt="Binding."></a></p>
  
  <p>I get an error, though:</p>
  
  <pre><code>class Notes.Document
  2019-05-29 11:49:02.433383+0200 Notes[3568:27704580] Cannot create attributed string from object &lt;Notes.Document: 0x600002c30100&gt; of class Notes.Document
  </code></pre>
  
  <p>I am completely clueless about what is happening. I would read this as the binding trying to convert the Document object (so self) to an attributed string, but I don't see how it would get that idea.</p>