This is my code, I would give you an example.In documentation on authopen 
command-w writes data in file, but I can't do it. 


On 27 Jul 08, at 02:19, Macarov Anatoli wrote:
> HI Andrew Farmer,
> This is my cod:
>
>      NSString *command =@"/usr/libexec/authopen" ;
>      NSArray *args = [NSArray
arrayWithObjects:@"-w",@"/etc/ 
> tolea.txt",nil];
>      NSTask *task = [[NSTask alloc] init];
>      NSPipe *newPipe = [NSPipe pipe];
>      NSFileHandle *readHandle = [newPipe fileHandleForReading];
>      NSData *inData;
>      NSString *tempString;
>      [task setLaunchPath:command];
>      [task setArguments:args];
>      [task setStandardOutput:newPipe];
>     
 [task setStandardError:newPipe];
>      [task launch];
>      inData = [readHandle readDataToEndOfFile];
>      tempString = [[NSString alloc] initWithData:inData  
> encoding:NSASCIIStringEncoding];
>      [task release];
>
> I can't record data in the file. How to correctly do it?

Er... it might help if you tried to write some data to the file?  
Copying and pasting other people's code will only get you so far if  
you don't understand it.




      ________________________________________________________
Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to