I've bounded the menu to the NSCollectionView in interface builder. But when I CTRL+click (right click) on it the menu is not showing.
I've tried adding some method to the NSCollectionView subclass. None of them is invoked:
+ (NSMenu*)defaultMenu
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
- (void)rightMouseDown:(NSEvent *)theEvent
- (void)sendEvent:(NSEvent *)theEvent
The only method which is invoked is:
- (NSView *)hitTest:(NSPoint)aPoint
Which means that the NSCollectionView receives the mouse events.
I've also tried to add the same methods to the subclass of NSCollectionViewItem, and the result is the same. Only hitTest:
is called.