I am using a custom mouseMove
event in NSTextView
to set the cursor to a pointer when it's outside the content insets. When it's inside the editable area, I'm calling [super mouseMove]
:
- (void)mouseMoved:(NSEvent*)event {
NSPoint point = [self convertPoint:event.locationInWindow fromView:nil];
if ((point.x > self.textContainerInset.width &&
point.x < self.frame.size.width - self.textContainerInset.width)
) {
[super mouseMoved:event];
} else if (point.x > 10) {
[NSCursor.arrowCursor set];
}
}
When selecting a line break in my text (meaning the empty part at the end of a line) and hovering mouse over the selection, [super mouseMoved:event]
produces the following message on every pixel the mouse moves:
Appname[29357:853497] [Framework] Shared items array is empty
Appname[29357:853497] [Framework] No shared items can be accessed
I am confused why this happens and what might be the cause?
EDIT:
This seems to happen even without subclassing NSTextView
. It might be a bug in macOS Catalina. For me, it doesn't seem to cause any other problems.
TextView
and thetextView
outlet ofAppDelegate
isn't connected. Is your code executed? – Anatole