Re: Translate Services Menu to Swift


Gerriet M. Denkmann
 

On 15 Jul 2018, at 14:05, Gerriet M. Denkmann <g@...> wrote:

This works:

- (void)lookUppString:(NSPasteboard *)pboard userData:(NSString *)data error:(NSString * _Nullable *)error
{
NSLog(@“%s",__FUNCTION__);
}

But this does not:
func lookUppString(_ pboard: NSPasteboard, _ userData: String, _ error: AutoreleasingUnsafeMutablePointer<NSString?>)
{
print(#function)
}
Now this is ok:
@objc func nnn(_ pboard: NSPasteboard, _ userData: String)

Where nnn = value of “Instance Method name” from Info.plist

I am sure this is very well documented somewhere.
The problem is that I am too stupid to find this.

Gerriet.

Join cocoa@apple-dev.groups.io to automatically receive all group messages.