NSEventTrackingRunLoopMode and mouseDown
NSEventTrackingRunLoopMode and mouseDown
- Subject: NSEventTrackingRunLoopMode and mouseDown
- From: Oleg Krupnov <email@hidden>
- Date: Tue, 27 Oct 2009 11:14:37 +0300
Hi,
I'd like to block my application while an animation is in progress. By
"blocking" I mean that the app does not respond and discards any kind
of mouse or keyboard input except mouseDragged and mouseUp events,
just in case the user is dragging something. For this purpose I use a
run loop in NSEventTrackingRunLoopMode, lilke follows (and I think the
built-in drag manager does nearly the same thing):
do
{
[[NSRunLoop currentRunLoop] runMode:NSEventTrackingRunLoopMode
beforeDate:endDate];
}
while ([(NSDate*)[NSDate date] compare:endDate] == NSOrderedAscending);
I use this code for two different animations, and what puzzles me is
that for one animation, the mouse down events are discarded, whereas
for the other animation the mouse down events are accumulated and then
get to the main loop when the temporary loop exits. How could such
thing be? Can anyone explain please?
_______________________________________________
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