If a NSImageView is Editable and contains an image, it is possible to copy it's content via CMD+C
In my subclass i don't want the Editable property to be YES (cause of cut, drop, etc...) i just want to support the copy, but wasn't able to figure out, what makes the copy work
In my subclass i tried
- (void)copy:(id)sender {
}
- (BOOL)refusesFirstResponder {
return NO;
}
- (BOOL)respondsToSelector:(SEL)aSelector {
if (aSelector == @selector(copy:)) {
return YES;
}
return [super respondsToSelector:aSelector];
}
but the copy command from the menu is grayed out and CMD+C doesn't work either (it triggers the menu copy:
)
How to add support for copy an NSImageView subclass, which is Editable=NO