Re: Swift and NSXPCInterface

2014-08-09 Thread Gerriet M. Denkmann
On 9 Aug 2014, at 16:20, Quincey Morris wrote: > On Aug 8, 2014, at 23:48 , Gerriet M. Denkmann wrote: > >> let b = NSXPCInterface( protocol: Xpc_CommonProtocol ) > > When I try it, the “protocol” is syntax highlighted as a keyword, so I > suspect that’s the first problem. Taking a cue

Re: Swift and NSXPCInterface

2014-08-09 Thread Quincey Morris
On Aug 8, 2014, at 23:48 , Gerriet M. Denkmann wrote: > let b = NSXPCInterface( protocol: Xpc_CommonProtocol ) When I try it, the “protocol” is syntax highlighted as a keyword, so I suspect that’s the first problem. Taking a cue from the declaration of NSXPCInterface itself, I can fix th

Swift and NSXPCInterface

2014-08-08 Thread Gerriet M. Denkmann
I am trying to translate this: NSXPCInterface *b = [NSXPCInterface interfaceWithProtocol:@protocol(Xpc_CommonProtocol)]; to Swift. This compiles (and runs) as expected: var dummy : AnyObject? if let protoDummi = dummy as? Xpc_CommonProtocol { println("dummy DOES implement Xpc_Co