Re: How to write a string to a file

2008-08-18 Thread Andy Lee
On Aug 18, 2008, at 11:28 PM, David wrote: Thanks for the quick responses. Why isn't this already in NSString?I found an old reference saying to use [filehandle writeData:[nsstring dataUsingEncoding:...]] This seems obtuse. I have been using Cocoa for 6 months and it is not seeming any more con

Re: How to write a string to a file

2008-08-18 Thread Ken Thomases
On Aug 18, 2008, at 10:28 PM, David wrote: Why isn't this already in NSString? I would sooner suggest removing -writeToFile:... from NSString than adding -appendToFile:. At some point you get a many-to-many explosion of combinations (NString, NSData, NSArray, NSDictionary, NSValue, NSNum

Re: How to write a string to a file

2008-08-18 Thread Alex Kac
On Aug 18, 2008, at 10:59 PM, David <[EMAIL PROTECTED]> wrote: Thanks for the quick responses. Why isn't this already in NSString?I found an old reference saying to use [filehandle writeData:[nsstring dataUsingEncoding:...]] This seems obtuse. I have been using Cocoa for 6 months and it is not

Re: How to write a string to a file

2008-08-18 Thread Michael Ash
On Mon, Aug 18, 2008 at 11:28 PM, David <[EMAIL PROTECTED]> wrote: > Thanks for the quick responses. Why isn't this already in NSString?I found > an old reference saying to use [filehandle writeData:[nsstring > dataUsingEncoding:...]] > This seems obtuse. I have been using Cocoa for 6 months and it

Re: How to write a string to a file

2008-08-18 Thread David
Thanks for the quick responses. Why isn't this already in NSString?I found an old reference saying to use [filehandle writeData:[nsstring dataUsingEncoding:...]] This seems obtuse. I have been using Cocoa for 6 months and it is not seeming any more consistent nor powerful than when I started. I fi

Re: How to write a string to a file

2008-08-18 Thread Ken Thomases
On Aug 18, 2008, at 10:00 PM, David wrote: I know it sounds like a basic question, but I've looked and it doesn't seem as obvious to me as it should. I want to write out data to a file to describe my tree structure. I'd like to have a method which appends a string to the end of a text file.

Re: How to write a string to a file

2008-08-18 Thread Adam R. Maxwell
On Aug 18, 2008, at 8:00 PM, David wrote: I know it sounds like a basic question, but I've looked and it doesn't seem as obvious to me as it should. I want to write out data to a file to describe my tree structure. I'd like to have a method which appends a string to the end of a text file.

How to write a string to a file

2008-08-18 Thread David
I know it sounds like a basic question, but I've looked and it doesn't seem as obvious to me as it should. I want to write out data to a file to describe my tree structure. I'd like to have a method which appends a string to the end of a text file. I don't really want to store everything in memor