4

I have a Table View Cell and have added an action to it that I want to execute when a value is changed.

enter image description here

I have added the action method in the viewController

@IBAction func valueEntered(sender: NSTextFieldCell)
{

    print("valueEntered")

}

I can edit the Table View Cell by double clicking on it, but my method is never called.

I know I have done this before but I must be missing a step.

iphaaw
  • 6,764
  • 11
  • 58
  • 83
  • Have you tried using the textfields delegate methods? – Sha7x Apr 16 '16 at 08:04
  • I am guessing that your `@IBAction` is conflicting with the tables delegate method `didSelectRowAtIndexPath`. Have you tried putting a breakpoint at the tableView's `didSelectRowAtIndexPath`? Could you try putting up some codes so it is easier to narrow down the cause of the problem? – Rachel Fong Apr 16 '16 at 08:04

1 Answers1

0

You have to hook up the NSTableView delegate.

In your case, control-click and drag from Reseller Table up to File's Owner and choose delegate.

BigHeadCreations
  • 1,583
  • 3
  • 16
  • 31