Re: [swift-users] ObjC vs Swift action selectors

2016-12-07 Thread David Catmull via swift-users
I created a simple test project, and found that it didn't fail. Then I looked at my original test again and realized it was actually failing for other reasons. So never mind :) On Tue, Dec 6, 2016 at 1:55 PM, Joe Groff wrote: > > On Dec 6, 2016, at 12:53 PM, David Catmull wrote: > > I tried, wr

Re: [swift-users] ObjC vs Swift action selectors

2016-12-06 Thread Joe Groff via swift-users
> On Dec 6, 2016, at 12:53 PM, David Catmull wrote: > > I tried, writing that as @objc(action:) #selector(ClassName.action(_:)) but > that got an "expected declaration" error. > > I also tried adding @objc(action:) to the method itself (which seems > redundant anyway), but that didn't help ei

Re: [swift-users] ObjC vs Swift action selectors

2016-12-06 Thread David Catmull via swift-users
I tried, writing that as @objc(action:) #selector(ClassName.action(_:)) but that got an "expected declaration" error. I also tried adding @objc(action:) to the method itself (which seems redundant anyway), but that didn't help either. On Tue, Dec 6, 2016 at 11:50 AM, Joe Groff wrote: > > > > On

Re: [swift-users] ObjC vs Swift action selectors

2016-12-06 Thread Joe Groff via swift-users
> On Dec 6, 2016, at 8:54 AM, David Catmull via swift-users > wrote: > > I have a unit test in which I verify that a view controller is correctly > validating items in a context menu. I converted the view controller class to > Swift, keeping the selector names the same, while the test is stil

[swift-users] ObjC vs Swift action selectors

2016-12-06 Thread David Catmull via swift-users
I have a unit test in which I verify that a view controller is correctly validating items in a context menu. I converted the view controller class to Swift, keeping the selector names the same, while the test is still in ObjC. The test now doesn't work because the selector created in ObjC as @selec