> On Aug 10, 2019, at 12:24 AM, Kurt Bigler via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> I've just started implementing the Cocoa windows.  The NSView subclasses 
> involved are receiving drawRect: messages but are not receiving mouseDown:.

It seems to me like your window is not setup properly or the view is not 
properly configured in the window.

NSApplication dispatches a mouseDown event to NSWindow and the window 
dispatches the event to the NSView. The responder chain is not involved unless 
using the default implementation which simply passes the message to the next 
responder. The method acceptsFirstResponder does not play a roll in mouseDown.

You could subclass NSWindow and override sendEvent: to see what is happening 
during a mouse down.

#0  0x0000000100001355 in -[MyView mouseDown:]
#1  0x00007fff8d7db24f in -[NSWindow(NSEventRouting) 
_handleMouseDownEvent:isDelayedEvent:] ()
#2  0x00007fff8d7d7a6c in -[NSWindow(NSEventRouting) 
_reallySendEvent:isDelayedEvent:] ()
#3  0x00007fff8d7d6f0a in -[NSWindow(NSEventRouting) sendEvent:] ()
#4  0x00007fff8d65b681 in -[NSApplication(NSEvent) sendEvent:] ()
#5  0x00007fff8ced6427 in -[NSApplication run] ()
#6  0x00007fff8cea0e0e in NSApplicationMain ()

--Richard Charles

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to