Re: preventWindowOrdering
Re: preventWindowOrdering
- Subject: Re: preventWindowOrdering
- From: Brian Webster <email@hidden>
- Date: Thu, 14 Mar 2002 09:13:45 -0600
On Tuesday, March 12, 2002, at 07:39 PM, Andreas Schwarz wrote:
A code snippet:
NSLog(@"Here");
[super mouseDown:theEvent];
NSLog(@"Here 2");
while ([theEvent type] != NSLeftMouseUp) {
theEvent = [[self window] nextEventMatchingMask:
NSLeftMouseUpMask | NSLeftMouseDraggedMask];
// Checking for drag here
}
It is the while loop that is causing the problem (the app will
log "Here" and then just freeze until you click in the view a
second time, at which point it will log "Here 2" and continue
on as if nothing ever happened). But of course that doesn't
make sense...
I tried putting this code into a plain NSView subclass and I
didn't get the same problems. This is pretty mysterious...
perhaps it has something to do with the NSView class you're
inheriting from. Was it an NSBrowser? Perhaps the NSMatrix
you're clicking in is doing its own mouse tracking in its
mouseDown: implementation?
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.