Re: Cocoa window messages in app being ported from Carbon
Re: Cocoa window messages in app being ported from Carbon
- Subject: Re: Cocoa window messages in app being ported from Carbon
- From: Richard Charles via Cocoa-dev <email@hidden>
- Date: Sat, 10 Aug 2019 21:45:31 -0600
> On Aug 10, 2019, at 12:24 AM, Kurt Bigler via Cocoa-dev
> <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden