3

I want to define a custom NSControl (or NSView), now the problem is how to add a Sent Action to it.

Sent Actions

As shown in the image, here are one or more Sent Actions for a control in the Connections inspector, for a NSButton, here's only one action, for a NSTableView, here are two actions.

How can I add a new action for my custom control so that it too is listed here?

Thanks.

Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
Mandroid
  • 225
  • 1
  • 10
  • Interesting question. The docs for `NSControl` define `action` as `var action: Selector? { get set }`. I tried subclassing `NSControl` and adding a similar property `otherAction` with the exact same signature, but it doesn't show up on Interface Builder... – Nicolas Miari Apr 03 '18 at 05:15
  • I need to know this too ;) Had very little success googling this. – Kristian Erik Tigersjäl Sep 18 '18 at 18:15

0 Answers0