Re: NSTask not using arguments?
Re: NSTask not using arguments?
- Subject: Re: NSTask not using arguments?
- From: James McConnell <email@hidden>
- Date: Thu, 24 Feb 2005 17:58:39 -0600
On 2/24/05 3:56 PM, "Sherm Pendley" <email@hidden> wrote:
> The other alternative is to launch /bin/sh as your task, and pass it
> two arguments: "-c" as the first, and the entire command you want to
> execute (globs and redirects included) as the second.
>
> sherm--
Thanks for the suggestion, Sherm. This seems to be the best and easiest
course of action for what I want to accomplish. I don't need any special
control over the output, other than writing it to the "md5File", which the
md5sum program takes care of itself, so why not let it do just that? I also
have some similar tasks this will work well for also. Now, just for
clarification (as I'm not able to test this), I would have to provide the
absolute path to the executable as it resides in my /Resources/Binaries/bin
folder in my Contents folder of my app package, correct? I'm fairly
certain, but I ask simply for clarification. And this of course would be
achieved by using [[NSBundle mainBundle] resourcePath] and appending the
correct subpath with "stringAppendingByString".
I will need, however, to do the infamous "output from NSTask to NSTextView",
but I've found enough articles (and AMShellWrapper) that I think I can
handle that on my own. So thanks to Sherm and Robert Martin for your
invaluable help.
I'll mark this as SOLVED when I get to work and actually implement this.
The Cocoa list saves again!
James
_______________________________________________
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