Hello.
My OS X document application updates a sequential file, containing several records separated by the new line special character. Each record contains several fields (strings) separated by a specific character.
I would like to save the value of a NSTextField allowing rich text in one of these fields. Therefore I need to convert a NSAttributedString to a String without losing its attributes.
Looking with Google I understand that I should use dataFromRange:documentAttributes:error: to create a NSData object,then getBytes with full length. But as I am new in Swift without any Obj-C knowledge, I cannot figure out how to do.
And of course I also need to convert the created string back to a NSAttributedString in order to display it later.
Thanks for your help,
Gilbert