{"action":"created","issue":{"url":"https://api.github.com/repos/skywinder/ActionSheetPicker-3.0/issues/137","labels_url":"https://api.github.com/repos/skywinder/ActionSheetPicker-3.0/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/skywinder/ActionSheetPicker-3.0/issues/137/comments","events_url":"https://api.github.com/repos/skywinder/ActionSheetPicker-3.0/issues/137/events","html_url":"https://github.com/skywinder/ActionSheetPicker-3.0/issues/137","id":57475328,"number":137,"title":"EXC_BAD_ACCESS(code=1, address=0x2f) in ActionStringDoneBlock","user":{"login":"manzznam","id":3786112,"avatar_url":"https://avatars.githubusercontent.com/u/3786112?v=3","gravatar_id":"","url":"https://api.github.com/users/manzznam","html_url":"https://github.com/manzznam","followers_url":"https://api.github.com/users/manzznam/followers","following_url":"https://api.github.com/users/manzznam/following{/other_user}","gists_url":"https://api.github.com/users/manzznam/gists{/gist_id}","starred_url":"https://api.github.com/users/manzznam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manzznam/subscriptions","organizations_url":"https://api.github.com/users/manzznam/orgs","repos_url":"https://api.github.com/users/manzznam/repos","events_url":"https://api.github.com/users/manzznam/events{/privacy}","received_events_url":"https://api.github.com/users/manzznam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-02-12T15:34:29Z","updated_at":"2015-02-19T12:16:08Z","closed_at":null,"body":"I alwas get this error when i try to write to the \"index\" variable in this \"done\" block. I took the code from the Swift Example. A println works inside the block but access to any variable doesn't.\r\n\r\n\r\n@IBAction func pickerTouched(sender: UIButton) {\r\n        var index = 0\r\n        \r\n        let done: ActionStringDoneBlock = {(picker: ActionSheetStringPicker!, selectedIndex: NSInteger!, selectedValue : AnyObject!) in            \r\n            index = selectedIndex\r\n            return\r\n        }\r\n        \r\n        ActionSheetStringPicker.showPickerWithTitle(\"Nav Bar From Picker\", rows: [\"One\", \"Two\", \"A lot\"], initialSelection: 1, doneBlock: done, cancelBlock: {ActionStringCancelBlock in return }, origin: sender.superview!.superview)\r\n    }\r\n\r\n![screenshot 2015-02-12 16 30 13](https://cloud.githubusercontent.com/assets/3786112/6170376/83f3f58e-b2d4-11e4-9ca9-e0d91e8da30a.png)\r\n"},"comment":{"url":"https://api.github.com/repos/skywinder/ActionSheetPicker-3.0/issues/comments/75042598","html_url":"https://github.com/skywinder/ActionSheetPicker-3.0/issues/137#issuecomment-75042598","issue_url":"https://api.github.com/repos/skywinder/ActionSheetPicker-3.0/issues/137","id":75042598,"user":{"login":"skywinder","id":3356474,"avatar_url":"https://avatars.githubusercontent.com/u/3356474?v=3","gravatar_id":"","url":"https://api.github.com/users/skywinder","html_url":"https://github.com/skywinder","followers_url":"https://api.github.com/users/skywinder/followers","following_url":"https://api.github.com/users/skywinder/following{/other_user}","gists_url":"https://api.github.com/users/skywinder/gists{/gist_id}","starred_url":"https://api.github.com/users/skywinder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skywinder/subscriptions","organizations_url":"https://api.github.com/users/skywinder/orgs","repos_url":"https://api.github.com/users/skywinder/repos","events_url":"https://api.github.com/users/skywinder/events{/privacy}","received_events_url":"https://api.github.com/users/skywinder/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T12:16:07Z","updated_at":"2015-02-19T12:16:07Z","body":"@manzznam, @loomtronic  Yes, you're right! It's a good question, thank you!\r\n**fucking_closure_syntax**! Spend an hour to figure out, how to do it!\r\nCheck examples now."}}