• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask: how to launch a binary as if I launched it via terminal?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSTask: how to launch a binary as if I launched it via terminal? (From: Colas B <email@hidden>)
 >Re: NSTask: how to launch a binary as if I launched it via terminal? (From: Jerry Krinock <email@hidden>)
 >Re: NSTask: how to launch a binary as if I launched it via terminal? (From: Colas B <email@hidden>)

  • Prev by Date: Re: NSTask: how to launch a binary as if I launched it via terminal?
  • Next by Date: Re: NSTask: how to launch a binary as if I launched it via terminal?
  • Previous by thread: Re: NSTask: how to launch a binary as if I launched it via terminal?
  • Next by thread: Re: NSTask: how to launch a binary as if I launched it via terminal?
  • Index(es):
    • Date
    • Thread