InterfaceBuilder NSButton connect to NSViewController Cause “Could not connect action, target class NSObject does not respond to”

依然范特西╮ 提交于 2020-01-24 19:35:16

问题


I have a view-based NSTableView whose "file's owner" is the ViewController. I dragged a button(for deletion) on the custom NSTableCellView, so I want to click the button and delete the current row from tableView, but when add a row the debug console tells me "Could not connect action, target class NSObject does not respond to deleteAction:"

I m using the NSArrayController binding the NSTableView(add action is triggered successfully). I also got another weird problem, I try to subclass NSTableCellView and set the cell's "Custom Class" to MyTableCellView but I can not connect the button to my MyTableCellView.

来源:https://stackoverflow.com/questions/43108777/interfacebuilder-nsbutton-connect-to-nsviewcontroller-cause-could-not-connect-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!