What is the preferred way to set NSTextView content from NSAttributedString?
What is the preferred way to set NSTextView content from NSAttributedString?
- Subject: What is the preferred way to set NSTextView content from NSAttributedString?
- From: Jeff Younker via Cocoa-dev <email@hidden>
- Date: Sun, 2 Feb 2020 11:31:33 -0800
Situation:
- I am working in Swift 5.
- I have an instance of an NSTextView. (Call it "V")
- The value has already been set once. (Call this value "T1")
- V is showing T1.
- I have an NSAttributedString from another source. (Call this value
"T2")
Desired goal:
- I want to set the displayed contents of V to T2.
What is/are the recommended way/s to do this?
*I would hope that I could assign V.attributedString = T2, but alas the
world does not seem to be this simple.*
Thanks in advance.
_______________________________________________
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