NSTask send commands via standardInput
NSTask send commands via standardInput
- Subject: NSTask send commands via standardInput
- From: René Korthaus <email@hidden>
- Date: Sat, 27 Nov 2004 21:58:46 +0100
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.
Anybody has a clue or any working example for sending commands to an NSTask?
Thanks in advance,
René Korthaus
-------------------------------------------------------------
The signature is currently on vacations.
_______________________________________________
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