Re: NSTask send commands via standardInput
Re: NSTask send commands via standardInput
- Subject: Re: NSTask send commands via standardInput
- From: Andrew Farmer <email@hidden>
- Date: Sat, 27 Nov 2004 13:26:07 -0800
On 27 Nov 2004, at 12:58, René Korthaus wrote:
Hello everybody,
i am running an NSTask and while running i want to send commands to
this task. I now googled half a day and only found this code:
NSString * commandString = [commandField stringValue]; // this is my
command
/* this is what i found on the web */
NSData * commandToSend = [commandString
dataUsingEncoding:NSUTF8StringEncoding];
[[[qemu standardInput] fileHandleForWriting] writeData:commandToSend];
I have a NSTextView where i see the output of the task, but when i
send, lets say quit via the commandField (NSTextField), nothing
happens to my task and the output says
"q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K". That's with all commands i
pass to the task.
Looks like the program in question uses readline or something to parse
input. You may want to check to see if there's an option to turn this
off.
What's the program?
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden