Swift: Add Action to a Table View Cell when value entered

288 views Asked by At

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.

1

There are 1 answers

0
BigHeadCreations On

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.