{"action":"closed","issue":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2971","repository_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa","labels_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2971/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2971/comments","events_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2971/events","html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/issues/2971","id":159269775,"number":2971,"title":"Cannot convert value of type 'Action<Void, Void, NSError>?' to expected argument type 'Action<_, _, _>'","user":{"login":"KiranPanesar","id":1433713,"avatar_url":"https://avatars.githubusercontent.com/u/1433713?v=3","gravatar_id":"","url":"https://api.github.com/users/KiranPanesar","html_url":"https://github.com/KiranPanesar","followers_url":"https://api.github.com/users/KiranPanesar/followers","following_url":"https://api.github.com/users/KiranPanesar/following{/other_user}","gists_url":"https://api.github.com/users/KiranPanesar/gists{/gist_id}","starred_url":"https://api.github.com/users/KiranPanesar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KiranPanesar/subscriptions","organizations_url":"https://api.github.com/users/KiranPanesar/orgs","repos_url":"https://api.github.com/users/KiranPanesar/repos","events_url":"https://api.github.com/users/KiranPanesar/events{/privacy}","received_events_url":"https://api.github.com/users/KiranPanesar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-08T20:56:42Z","updated_at":"2016-06-08T22:59:10Z","closed_at":"2016-06-08T22:59:09Z","body":"I've worked with RAC 2.X extensively in the past, and have recently picked up RAC 4 for a side project.\r\n\r\nI am trying to bind a `UIButton`'s tap event to perform an action in my View Model. As per the docs, I am using an `Action` and `CocoaAction` to do this like so:\r\n\r\n```swift\r\nlet cocoaAction = CocoaAction(viewModel?.submitOrderAction, input: Void) \r\nself.nextButton.addTarget(cocoaAction, action: cocoaAction.selector, forControlEvents: UIControlEvents.TouchUpInside)\r\n```\r\nI am getting the following compiler error on the first line:\r\n```\r\nCannot convert value of type 'Action<Void, Void, NSError>?' to expected argument type 'Action<_, _, _>\r\n```\r\nThe ViewModel is defined as a protocol, and the action is defined like so:\r\n```swift\r\nvar submitOrderAction: Action<Void, Void, NSError> { get }\r\n```\r\n\r\nCould someone explain what I'm doing wrong here? As I mentioned, I'm familiar with RAC 2.X and have used `RACCommand`s for this type of thing in the past, so would be extra appreciative if someone could compare `RACCommand` with `Action` in their explanation. Thanks! 👍 "}}
{"actor":{"display_login":"mdiep"}}