Re: mouseDown and NSTabView
Re: mouseDown and NSTabView
- Subject: Re: mouseDown and NSTabView
- From: Greg Herlihy <email@hidden>
- Date: Tue, 21 Mar 2006 06:56:22 -0800
- Thread-topic: mouseDown and NSTabView
There is no behavior that the window controller can expect with regard to
the mouse events that it sees: it is always possible for any mouse event to
be handled before it ever reaches the controller. The controller cannot even
safely assume that the kinds of events that it does receive will be
consistently received - since a preceding responder suddenly decide to stop
forwarding them for reasons of its own.
To put it simply: after the application turns down the first opportunity to
handle the mouse event, it cannot assume that it will be given a second
opportunity to handle it later on. Therefore if a mouse event is of interest
to the application, it must handle it at the first chance that it gets -
that is, in the NSView subclass in which the event occurred.
Greg
On 3/21/06 1:26 AM, "Jonathan Fewtrell" <email@hidden> wrote:
> I have an NSView subclass inside an NSScrollView which is on one
> NSTabViewItem of an NSTabView in an NSWindow. The window is
> controlled by an NSWindowController.
>
> -mouseDown, -mouseUp and -mouseDragged are implemented in the window
> controller. I find that -mouseDown is never called, whereas -mouseUp
> and -mouseDragged are OK.
>
> I assume that the mouseDown events are being swallowed somewhere and
> not passed up the responder chain to the window controller, but I
> can't really see why. I get the impression it must be something to do
> with the NSTabView or NSTabViewItem.
>
> Is this expected behaviour?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden