While using swift playgrounds on macOS i am trying to detect a mouse click however it is not working. Here is my code...
func mouseDown(theEvent : NSEvent) {
print("left mouse")
}
i can't use override func because it will give me an error and I'm not sure if the fact that this is not in a class that inherits NSViewController. If I must use an NSViewController could you tell me how to update the values of variables in another class. Could someone please help?