Re: Standard input/output in Objective-C
Re: Standard input/output in Objective-C
- Subject: Re: Standard input/output in Objective-C
- From: Jens Alfke <email@hidden>
- Date: Tue, 23 Mar 2010 15:18:59 -0700
On Mar 23, 2010, at 2:44 PM, Mikael Wämundson wrote:
inputData = [fileHandle availableData];
inputString = [[NSString alloc] initWithData: inputData
encoding:NSUTF8StringEncoding];
[aPerson setPersonsFirstName: inputString];
You could just call fgets and then convert the resulting C string to
an NSString.
I think the reason there isn't anything "Cocoa-like" for this is that
hardly anyone uses Objective-C to write interactive console tools.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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