In my code I am overriding the mouseDown(with event: NSEvent)
however am finding that the mouse down event only fires once, when the NSTextField
becomes firstResponder
class GSTextField: NSTextField {
override func mouseDown(with event: NSEvent) {
print("in mouse down")
return super.mouseDown(with: event)
}
}
What I am ideally trying to achieve is to track the insert point on every mouse click. This is needed later in my code.
I think this has something to do wiht the field editor for the NSTextField doing the work behind the scenes. Thanks GS