Re: NSTask argument list

2016-06-25 Thread Graham Cox
> On 26 Jun 2016, at 3:22 PM, dangerwillrobinsondan...@gmail.com wrote: > > If it helps, you can think of it as an object oriented wrapped around C > system calls that keeps track of PID and all the other bits like stdout and > so on. > That helps to grok why the args is and array and the

Re: NSTask argument list

2016-06-25 Thread dangerwillrobinsondanger
If it helps, you can think of it as an object oriented wrapped around C system calls that keeps track of PID and all the other bits like stdout and so on. That helps to grok why the args is and array and the tool is separate. Sent from my iPhone > On Jun 26, 2016, at 1:37 PM, Graham Cox

Re: NSTask argument list

2016-06-25 Thread Graham Cox
Ah thanks Marco, Andy… this makes a lot more sense and works fine. —Graham > On 26 Jun 2016, at 2:30 PM, Marco S Hyman wrote: > I believe arguments is an array of arguments, not an array containing a > string that matches a command line. > > Then your arguments array should

Re: NSTask argument list

2016-06-25 Thread Marco S Hyman
> > NSString* argString = [NSString stringWithFormat:@"-i \"%@\" -c copy > %@", [url absoluteString], [self.outputFileURL absoluteString]]; > > self.ffMPEGTask = [NSTask launchedTaskWithLaunchPath:execPath > arguments:@[argString]]; I believe arguments is an array of

Re: NSTask argument list

2016-06-25 Thread Andy Lee
Don't glom the arguments together.  Pass each as a separate array element: "-i", the URL string, "-c", "copy", the output string. And you don't need to quote the arguments, just pass them as is. I hope that makes sense -- I'd make it more code-like if I were at my desk rather than on my phone.

NSTask argument list

2016-06-25 Thread Graham Cox
HI all, I am using NSTask to wrap ffmpeg, the video conversion utility. I am able to invoke ffmpeg alright, but it’s unclear how the argument list should be passed through NSTask. I tried making my various arguments into one big string, but ffmeg doesn’t parse it, instead writing an error.

Re: Security with Streams

2016-06-25 Thread Gerriet M. Denkmann
> On 26 Jun 2016, at 05:12, Jens Alfke wrote: > > >> On Jun 18, 2016, at 2:34 AM, Gerriet M. Denkmann >> wrote: >> >> 1. (important) the client really wants to know that: >> (1a) it is talking to the right server and not to some evil entity >>

Re: Security with Streams

2016-06-25 Thread Jens Alfke
> On Jun 18, 2016, at 2:34 AM, Gerriet M. Denkmann wrote: > > 1. (important) the client really wants to know that: > (1a) it is talking to the right server and not to some evil entity > masquerading as the real server. > (1b) the data it receives has not been

Re: Are NSFileWrappers safe for concurrent access?

2016-06-25 Thread Rick Mann
> On Jun 25, 2016, at 12:18 , Quincey Morris > wrote: > > On Jun 25, 2016, at 01:40 , Rick Mann wrote: >> >> It seems that they might not be, but I can't find documentation either way. > > What do you mean by “access”? Are you

Re: Satisfying a protocol - getters vs. functions

2016-06-25 Thread Quincey Morris
On Jun 25, 2016, at 12:49 , William Squires wrote: > > I was looking at the problem from the caller's end (i.e. client code), not > the callee's end, so the semantic requirements (such as getters not being > able to modify instance variables) aren't a consideration here.

Re: Satisfying a protocol - getters vs. functions

2016-06-25 Thread William Squires
Oops, I should have noted: 1) A getter doesn't require (or allow, IIRC?) parentheses, whereas a func call does, even if it takes no arguments. 2) I was looking at the problem from the caller's end (i.e. client code), not the callee's end, so the semantic requirements (such as getters not being

Re: Are NSFileWrappers safe for concurrent access?

2016-06-25 Thread Quincey Morris
On Jun 25, 2016, at 01:40 , Rick Mann wrote: > > It seems that they might not be, but I can't find documentation either way. What do you mean by “access”? Are you referring to their internal state, or their relationship to the file system? NSFileWrapper is *not* listed

Re: Satisfying a protocol - getters vs. functions

2016-06-25 Thread Quincey Morris
On Jun 25, 2016, at 11:59 , William Squires wrote: > > But would it make a difference if you have a getter named description that > has type String? They’re not interchangeable in Swift. The semantics are not even the same: getters aren’t allowed to mutate instance

Satisfying a protocol - getters vs. functions

2016-06-25 Thread William Squires
Let's take the CustomStringConvertible protocol, for example. You can use this to allow your class to "display" itself in a human-friendly format (for debugging, let's say), and you implement a function called description() -> String. But would it make a difference if you have a getter named

Are NSFileWrappers safe for concurrent access?

2016-06-25 Thread Rick Mann
It seems that they might not be, but I can't find documentation either way. -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the