• 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: Cocoa and UNIX txt files ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa and UNIX txt files ??


  • Subject: Re: Cocoa and UNIX txt files ??
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 24 Mar 2002 15:13:42 +0100

On Sunday, March 24, 2002, at 09:51 , Alberto wrote:

What I use in the String place to add the file content? Is there anything?

Yup, the most recommended way is at least trying to read the documentation.

If you did that, you'd know that

[clientsTextField setString:[NSString stringWithContentsOfFile:@"clients.lst"]]

does exactly what you want.

First caveat is the path, which is to be set (through NSFileManager), or explicitly given. Another is that unless you are pretty sure the file contents is short, it might be better to use an NSTextView.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
  • Follow-Ups:
    • Re: Cocoa and UNIX txt files ??
      • From: Alberto <email@hidden>
References: 
 >Re: Cocoa and UNIX txt files ?? (From: Alberto <email@hidden>)

  • Prev by Date: Re: NSCalendarDate bug, or my fault?
  • Next by Date: Re: NSSet Inefficiency
  • Previous by thread: Re: Cocoa and UNIX txt files ??
  • Next by thread: Re: Cocoa and UNIX txt files ??
  • Index(es):
    • Date
    • Thread