Access to events in tight loop?

2008-07-28 Thread Scott Squires
If I handle a mouse event and am processing it in a time consuming method which includes display, what's the cleanest way to peek at events during this time (to get updated mouse info,etc ) or to allow the run loop to continue enough to make another pass? Is there a clean way to allow the

Re: Access to events in tight loop?

2008-07-28 Thread Glenn English
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Scott Squires wrote: If I handle a mouse event and am processing it in a time consuming method which includes display, what's the cleanest way to peek at events during this time (to get updated mouse info,etc ) or to allow the run loop to

Re: Access to events in tight loop?

2008-07-28 Thread chaitanya pandit
What you can do is use the NSWindow's nextEventMatchingMask: method to determine the next event, here you can check for events that should discontinue your current processing. So, say if u want to do some processing only while mouse down, and stop if there is a mouse up while you are doing

Re: Access to events in tight loop?

2008-07-28 Thread Scott Anguish
do you have to use the tight loop approach? The view documentation discusses the pros and cons of this approach and other options. http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/SubclassingNSView/chapter_6_section_4.html#/ /apple_ref/doc/uid/TP40002978-CH7-SW27