0

I have a NSButton(provided delete item action) in the NSCollectionViewItem, the argument is set successfully the binding actions is responded and I also got the representedObject. But the target I m binding is the file's owner image for target binding

here is the method i got the representedObject:

- (void)removeAction:(id)object{
//    [_arrayController removeObject:object];
}

My problem is how to get the "_arrayController" instance or change the binding target to the ViewController that own the arrayController property?

Meonardo
  • 182
  • 13
  • BTW I m using Xcode 8.2.1, any comments will appreciated. – Meonardo Mar 29 '17 at 10:16
  • Dont use the binding and connect the action of the button to the first responder? – Willeke Mar 29 '17 at 10:58
  • Which object is the file's owner? – Willeke Mar 29 '17 at 10:58
  • @Willeke thanks man, first, I did create a delegate method to pass the button click events, but thing got weird the delegate(viewController managing NSCollectionView and own the arrayController property) value always nil when I click the button. Second, the file owner is NSCollectionViewItem instance. – Meonardo Mar 29 '17 at 11:45

0 Answers0