Earlier I did try mouseDown:, and it did capture all the clicks (which
is what I wanted), but I was not sure on how to implement it. How
would I override it so that clicks would not pass through to the
superview?
On 2009-09-28, at 8:07 PM, Kyle Sluder wrote:
On Sun, Sep 27, 2009 at 7:36
Just don't propagate it.
This is what the NSResponder implementation of -mouseDown: looks like:
- (void)mouseDown:(NSEvent *)theEvent
{
[[self nextResponder] mouseDown:theEvent];
}
All you have to do is *not* do that line, and *not* call super's implementation.
--Kyle Sluder
Thanks
On 2009-09-29, at 9:49 PM, Kyle Sluder kyle.slu...@gmail.com wrote:
Just don't propagate it.
This is what the NSResponder implementation of -mouseDown: looks like:
- (void)mouseDown:(NSEvent *)theEvent
{
[[self nextResponder] mouseDown:theEvent];
}
All you have to do is *not* do
You want to read up on how event handling in Cocoa works. When you
click, the window is sending events to your overlay view. But if that
view does not handle the event itself, it forwards it on to the next
view below the mouse. So, you need to override the required event
handling methods
Return self from hitTest inside your overlay view.
Jesper
On Sep 27, 2009, at 7:36 PM, PCWiz wrote:
Hi,
I have a transparent black NSView that I layer over my window using
NSView's addSubview method. This works fine, but I want to make it so
that all clicks are captured by the NSView,
Tried this earlier but it had no effect...
On 2009-09-28, at 7:57 AM, Jesper Storm Bache wrote:
Return self from hitTest inside your overlay view.
Jesper
On Sep 27, 2009, at 7:36 PM, PCWiz wrote:
Hi,
I have a transparent black NSView that I layer over my window using
NSView's addSubview
On Sun, Sep 27, 2009 at 7:36 PM, PCWiz pcwiz.supp...@gmail.com wrote:
I have a transparent black NSView that I layer over my window using NSView's
addSubview method. This works fine, but I want to make it so that all clicks
are captured by the NSView, because right now I can click through to
Hi,
I have a transparent black NSView that I layer over my window using
NSView's addSubview method. This works fine, but I want to make it so
that all clicks are captured by the NSView, because right now I can
click through to the superview underneath. I've already tried
returning NO for
On 28/09/2009, at 12:36 PM, PCWiz wrote:
Hi,
I have a transparent black NSView that I layer over my window using
NSView's addSubview method. This works fine, but I want to make it
so that all clicks are captured by the NSView, because right now I
can click through to the superview