Skip navigation.
 
mlRe: Posting commands?
FROM : Uli Kusterer
DATE : Wed Aug 30 19:43:01 2006

Am 29.08.2006 um 23:17 schrieb Ralf Menssen:
> Maybe that's a stupid question, but how can I easily postpone 
> processing until the next event queue processing? In former 
> frameworks we had this PostCommand mechanism, which was perfect for 
> my needs. Background: I get a request from dragging and can't 
> process it immediatly, because it involves Bluetooth activity, 
> which requires me to call CFRunLoop resulting in further recursive 
> calls from dragging and finally a crash.


  Well, performSelector:withObject:delay: or whatever the method is 
called should do the trick. But the question is: Do you really want 
to do it that way? You really *shouldn't* be doing dragging as a 
nested event loop. If you can, just set a flag in your view while 
dragging is going on, and unset it afterwards. Turn on mouse moved 
events simultaneously, and you can process the whole drag 
asynchronously, while still running an event loop.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de

Related mailsAuthorDate
mlPosting commands? Ralf Menssen Aug 29, 23:17
mlRe: Posting commands? I. Savant Aug 30, 00:29
mlRe: Posting commands? PGM Aug 30, 02:24
mlRe: Posting commands? Uli Kusterer Aug 30, 19:43