Re: masking events from Image Well
Re: masking events from Image Well
- Subject: Re: masking events from Image Well
- From: Henrietta Read <email@hidden>
- Date: Tue, 5 May 2009 07:35:51 -0700
Sorry to bother, got it all fixed with:
[[self window] discardEventsMatchingMask:NSLeftMouseDraggedMask
beforeEvent:theEvent];
On Tue, May 5, 2009 at 6:09 AM, Henrietta Read <email@hidden>wrote:
> Hi,
>
> I'm using an Image Well as a button... such as:
>
>
> - (void)mouseDown:(NSEvent *)theEvent
> {
> theEvent = [[self window]
> nextEventMatchingMask: NSLeftMouseUpMask];
> switch([theEvent type])
> {
> case NSLeftMouseUp:
>
> DoVariousImportantThingsHere();
>
> [view setNeedsDisplay:YES];
> break;
> default: break;
> }
> return;
> }
>
>
> The only snag is if the mouse moves even a tiny bit,
> the application window jumps suddenly when you
> mouse up.
>
> Should I be catching NSLeftMouseDraggedMask
> or some such thing?
>
_______________________________________________
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