Hi Jeffrey,
> It behaves as if the Matrix lies on top of the view and not as if the
click has to get through the custom view to the Matrix which is a subview.

That is exactly how clicks work.  The first view to receive mouseDown: is
the _deepest_ view that it the click hits. Please see the Cocoa event
handling guide for more details, <
http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/EventOverview/Introduction/chapter_1_section_1.html
>.

You can modify the view that first receives -mouseDown: by overriding
-[NSView hitTest:].  It's relatively rare though, and more useful when you
do not know what your subviews will be.   Please consider if a plain
NSMatrix is appropriate as a subview in the first place!

-Ken

On Sun, Feb 1, 2009 at 6:47 AM, Jeffrey Goines <
[email protected]> wrote:

> Hello.
> I have a custom view to which I add a NSMatrix as subview.
>
> I've set the target and action of the cells and it's working like I want.
>
> Now I want to introduce some mode in which the behaviour is different.
> A mouseclick should no longer trigger the action.
> I want to catch the click in the view and process it further there since
> it's the appropriate place.
>
> I've tried setting the view to acceptFirstResponder and the Matrix to
> resignFirstResponder,
> yet it's not working.
> It behaves as if the Matrix lies on top of the view and not as if the click
> has to get through
> the custom view to the Matrix which is a subview.
> I don't understand that.
>
> Thanks!
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/kenferry%40gmail.com
>
> This email sent to [email protected]
>
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to