• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSEventTrackingRunLoopMode and mouseDown
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Multithreading NSBezierPath creation and stroking. Measuring performance
  • Next by Date: Bold and Italic For Dictionary Font Attributes (Hillegass Chapter 20, Challenge 2)
  • Previous by thread: Re: Multithreading NSBezierPath creation and stroking. Measuring performance
  • Next by thread: Bold and Italic For Dictionary Font Attributes (Hillegass Chapter 20, Challenge 2)
  • Index(es):
    • Date
    • Thread