• 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
Re: Displaying file contents in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying file contents in NSTextView


  • Subject: Re: Displaying file contents in NSTextView
  • From: Rakesh Pandey <email@hidden>
  • Date: Mon, 17 Feb 2003 18:15:05 +0530

NSString *fileData = [[NSString alloc] initWithData:[NSData
dataWithContentsOfFile:yourFilePath]
encoding:NSMacOSRomanStringEncoding];
[yourTextView insertText:fileData];

Regards
Rakesh

On Monday, February 17, 2003, at 06:04 PM, Vidya Nair wrote:

> Hi All,
>
> I want to read the contents of a text file and display into a
> NSTextView.
> How do i do this...??
> The files contents are retrieved in form of NSData. How do i assign
> this
> NSData to TextView.
> Any ideas or clues will be greatly welcome...
> Waiting for suggestions ....
>
> Warm Regards
> Vidya Nair
>
> Tata Consultancy Services
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
>
Rakesh Pandey

C programmers never die - they're just cast into void.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Displaying file contents in NSTextView (From: "Vidya Nair" <email@hidden>)

  • Prev by Date: immutable NSMutableDictionary
  • Next by Date: Re: Displaying file contents in NSTextView
  • Previous by thread: Displaying file contents in NSTextView
  • Next by thread: Re: Displaying file contents in NSTextView
  • Index(es):
    • Date
    • Thread