Re: NSPipe or NSFileHandle buffering?
Re: NSPipe or NSFileHandle buffering?
- Subject: Re: NSPipe or NSFileHandle buffering?
- From: Cameron Hayne <email@hidden>
- Date: Sun, 01 Dec 2002 13:27:17 -0500
On 1/12/02 11:09 am, "mw" <email@hidden> wrote:
>
chomp($pop3host = <STDIN>);
>
chomp($filter_type = <STDIN>);
>
chomp($filter_match = <STDIN>);
>
chomp($username = <STDIN>);
>
chomp($password = <STDIN>);
>
chomp($delete = <STDIN>);
>
>
So I figured that in my Cocoa program, I should be able to have 6 method
>
calls in a row to write all of this information to the Perl program (entered
>
in text fields).
>
>
[writeHandle writeData: [NSData dataWithBytes:[popServer cString]
>
length:[popServer cStringLength]]];
>
[writeHandle writeData: [NSData dataWithBytes:[filterField cString]
>
length:[filterField cStringLength]]];
>
[writeHandle writeData: [NSData dataWithBytes:[filterFieldValue cString]
>
length:[filterFieldValue cStringLength]]];
>
[writeHandle writeData: [NSData dataWithBytes:[username cString]
>
length:[username cStringLength]]];
>
[writeHandle writeData: [NSData dataWithBytes:[password cString]
>
length:[password cStringLength]]];
>
[writeHandle writeData: [NSData dataWithBytes:[delete cString]
>
length:[delete cStringLength]]];
>
[writeHandle closeFile];
Your Perl program is expecting the 6 strings to be one per line (i.e.
separated by end-of-line characters). But I don't see you outputting any
end-of-line characters in your 'writeData' statements.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
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.