Re: NSTask: how to launch a binary as if I launched it via terminal?
Re: NSTask: how to launch a binary as if I launched it via terminal?
- Subject: Re: NSTask: how to launch a binary as if I launched it via terminal?
- From: Ken Thomases <email@hidden>
- Date: Mon, 14 Apr 2014 10:24:36 -0500
On Apr 14, 2014, at 10:08 AM, Colas B wrote:
> Without the quotes, the error is
> Error opening terminal: unknown.
Terminal doesn't just run the shell (which, in turn, runs pico). It provides a window and a TTY (terminal device) for the processes to use and translates the I/O to the window. This is no simple thing. In fact, it's very complex. It's not what NSTask does and, in fact, no built-in part of Cocoa does it for you.
It will be much, much simpler to simply load the file into a text view, let the user edit it that way, and save it back.
If you want the command to run in an actual Terminal window, you can use AppleScript to control Terminal and have it create a window and run a command within it.
Regards,
Ken
_______________________________________________
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