Support “styled text” in a scriptable Mac application (Cocoa Scripting)
问题 My app supports being scripted with Applescript. I am trying to make styled text content, stored in NSAttributedString objects, available to an Applescript user. I thought I could simply deliver styled text with the NSAttributedString class, just like I deliver plain text with the NSString class, but that does not work - Cocoa Scripting then reports that it cannot convert or coerce the data. I wonder if I'm missing something or if this is just plain impossible with the standard classes