best way to refuse events?
best way to refuse events?
- Subject: best way to refuse events?
- From: Matt Neuburg <email@hidden>
- Date: Sun, 11 Aug 2002 16:11:39 -0700
I'd like to refuse events while I do some time-consuming stuff. I mean that
any events that come in while I'm working (e.g. the user clicks a button)
should simply be thrown away. What's the best way to do this? It seems like
I should simply be discarding, just before I terminate processing, any
events that have piled up in the meantime. In other words, it appears I'd
like to flush the event queue. But I don't see quite how to do it.
If I use discardEventsMatchingMask:beforeEvent:, I have to designate an
existing event that won't be discarded, and that can't be right because I
want to discard all of them.
If I use nextEventMatchingMask:untilDate:inMode:dequeue:, I'll pause until
I actually get an event - and I'm not expecting any, and I don't want to
pause.
There must be some standard way to do this. What is it? Might it be that
what I'm supposed to do is post an event myself and then discard all the
events that preceded it? Thx - m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.