{"action":"created","issue":{"url":"https://api.github.com/repos/SwiftBond/Bond/issues/182","labels_url":"https://api.github.com/repos/SwiftBond/Bond/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/SwiftBond/Bond/issues/182/comments","events_url":"https://api.github.com/repos/SwiftBond/Bond/issues/182/events","html_url":"https://github.com/SwiftBond/Bond/issues/182","id":112558894,"number":182,"title":"NSTableView+Bond with tableColumn","user":{"login":"thomjordan","id":6006576,"avatar_url":"https://avatars.githubusercontent.com/u/6006576?v=3","gravatar_id":"","url":"https://api.github.com/users/thomjordan","html_url":"https://github.com/thomjordan","followers_url":"https://api.github.com/users/thomjordan/followers","following_url":"https://api.github.com/users/thomjordan/following{/other_user}","gists_url":"https://api.github.com/users/thomjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/thomjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomjordan/subscriptions","organizations_url":"https://api.github.com/users/thomjordan/orgs","repos_url":"https://api.github.com/users/thomjordan/repos","events_url":"https://api.github.com/users/thomjordan/events{/privacy}","received_events_url":"https://api.github.com/users/thomjordan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-21T10:38:48Z","updated_at":"2015-10-23T09:16:42Z","closed_at":null,"body":"Here's a slight variation for the NSTableView+Bond extension that adds a `tableColumn` parameter to `createCell()`.\r\n\r\nAfter making these changes to a renamed protocol in a local copy of NSTableView+Bond, I was pleased to find that when using `bindTo()` for binding a datasource to a tableView, simply binding a datasource for each individual column to the same `( tableView, delegate )` pair works perfectly, simply by addressing the columns by their identifier within a `createCell()` implementation.\r\nI've been using this variation for the past two days or so, and everything's working well.\r\n\r\nThis may be redundant, since I'm not sure if I missed an existing way to bind to multiple columns in an NSTableView. If so, please respond. Also, I'm not sure if this is the appropriate medium for this since I'm not a contributor.  If the issue tracker for Bond is ok with being used similarly to the dev-branch of a mailing list then I'm in the right place I think.\r\n\r\nI've been using Bond for about four days now and my whole way of thinking about my project has been revolutionized. Thanks !\r\n\r\n```swift\r\npublic protocol BNDTableViewWithColumnDelegate {\r\n    typealias Element\r\n    func createCell(row: Int, tableColumn: NSTableColumn, array: ObservableArray<Element>, tableView: NSTableView) -> NSTableCellView\r\n}\r\n\r\n@objc func tableView(tableView: NSTableView, viewForTableColumn tableColumn: NSTableColumn?, row: Int) -> NSView? {\r\n    return delegate?.createCell(row, tableColumn: tableColumn?, array: array, tableView: tableView)\r\n}\r\n\r\ncolumn_1_datasource.bindTo( tableView, delegate: viewController )\r\ncolumn_2_datasource.bindTo( tableView, delegate: viewController )\r\ncolumn_3_datasource.bindTo( tableView, delegate: viewController )\r\ncolumn_4_datasource.bindTo( tableView, delegate: viewController )\r\n```"},"comment":{"url":"https://api.github.com/repos/SwiftBond/Bond/issues/comments/150524972","html_url":"https://github.com/SwiftBond/Bond/issues/182#issuecomment-150524972","issue_url":"https://api.github.com/repos/SwiftBond/Bond/issues/182","id":150524972,"user":{"login":"thomjordan","id":6006576,"avatar_url":"https://avatars.githubusercontent.com/u/6006576?v=3","gravatar_id":"","url":"https://api.github.com/users/thomjordan","html_url":"https://github.com/thomjordan","followers_url":"https://api.github.com/users/thomjordan/followers","following_url":"https://api.github.com/users/thomjordan/following{/other_user}","gists_url":"https://api.github.com/users/thomjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/thomjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomjordan/subscriptions","organizations_url":"https://api.github.com/users/thomjordan/orgs","repos_url":"https://api.github.com/users/thomjordan/repos","events_url":"https://api.github.com/users/thomjordan/events{/privacy}","received_events_url":"https://api.github.com/users/thomjordan/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T09:16:42Z","updated_at":"2015-10-23T09:16:42Z","body":"I mistakenly wrote \"row\" instead of column in the first code example above, and then unconsciously propagated that error in my subsequent comments.  I just went back and updated both comments with the correct info.  The multi-column NSTableView I've been using is working well with a separate datasource for each column.  Sorry for the mixup !"}}