• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Plain Text Editing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSArray - waste of time?
  • Next by Date: Re: Plain Text Editing
  • Previous by thread: Re: Fwd: NSArray - waste of time?
  • Next by thread: Re: Plain Text Editing
  • Index(es):
    • Date
    • Thread