• 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
Re: Posting commands?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Posting commands?


  • Subject: Re: Posting commands?
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 30 Aug 2006 19:43:01 +0200

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


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Posting commands? (From: Ralf Menssen <email@hidden>)

  • Prev by Date: Re: How to create an NSEvent for Option-E?
  • Next by Date: Re: How to create an NSEvent for Option-E?
  • Previous by thread: Re: Posting commands?
  • Next by thread: north - east - south - west selector using NSMatrix?
  • Index(es):
    • Date
    • Thread