On 27 May 2010, at 13:15, Ken Thomases wrote: > If, in a shell, you were to invoke a command like: > > /path/to/some/command -f /path/to/file > > Then the program would receive "-f" and "/path/to/file" as separate > arguments. To achieve the same thing with NSTask, you'd pass @"-f" and > @"/path/to/file" as two separate elements of the argument array. > > You've now switched to the equivalent of: > > /path/to/some/command -f/path/to/file > > That works in this case, but relies on the program you're invoking parsing > apart the option switch from its value. Apparently, that assumption holds > for the program in question. I just wanted to make sure you understood how > to replicate the original form using NSTask.
Thanks, I wondered about that actually, but had not tried sending the arguments separately yet. I'll make these changes, as you have made it clear that that is a more robust way to pass the arguments. Best, António ---------------------------------------------------- Disapprove of sin but not of the sinner ---------------------------------------------------- _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com