I have a simple application with 4 NSTextView element.
I would like to be able to write a content of these views into a single file.
What I am doing write know I am getting the NSData out of each of the elements using: dataFromRange
, then I concatenate the data and write to a file.
There is however a problem. Each set of NSData I get contains a full file structure; e.g. if I use NSHTMLTextDocumentType
in dataFromRange
, in the output file I am getting four HTML files from to .
How can I avoid that? Is there a common solution for different file types.