Event processing : nextEventMatchingMask

Ok. Not really a OGL question. Buuut probably ( hopfully ) a place where sombody has run into this before.

OSX Panther.

While processing events ‘by hand’ I call:

event=[ NSApp nextEventMatchingMask : NSAnyEventMask
untilDate : nil
inMode : NSDefaultRunLoopMode
dequeue : NO ]

This call always returns nil. If I set untilDate to distantFuture the call will block forever. However if I set dequeue : YES then all works as expected. So how can I simply check to see if an event exists in the event queue without removing it?

Better to post on the http://createmacgames.org/ or http://www.idevgames.com/ forums – more knowledgeable mac devs there than here

the Omni Group’s sample code passes [NSDate distantPast] to that method – does that help?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.