I create a bunch of NSviews programmatically. How can I set the function that is performend when the NSView is clicked?
For NSButton you can use button.addTarget
button.addTarget