Plain Text Editing
Plain Text Editing
- Subject: Plain Text Editing
- From: hac <email@hidden>
- Date: Sat, 14 Apr 2007 14:56:48 -0400
I'm making a document-based app that writes plain text documents. I'm new
to Obj-C and having some trouble writing the code to open documents. My
bugs occur, I think, when I'm trying to convert my NSData from a text file
to an NSString to put into my NSTextView.
In -loadDataRepresentation, I wrote fileContents = [data
retain];(fileContents is of the NSData type) and in
-windowControllerDidLoadNib, I
wrote [textArea setString:fileContents]; (textArea is my NSTextView) which
created a warning because fileContents isn't a string, and had no viable
effect on textArea.
How do I get the data from -loadDataRepresentation into a form that I can
put into an NSTextView? Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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