• 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: performSelectorOnMainThread for a selector with a primitive argument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performSelectorOnMainThread for a selector with a primitive argument


  • Subject: Re: performSelectorOnMainThread for a selector with a primitive argument
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 16 Feb 2006 12:11:46 -0700


On Feb 16, 2006, at 11:53 AM, Eric Crichlow wrote:

Problem is, I can't see any way of forcing execution to the main thread
other than performSelectorOnMainThread, but that method requires that the
invoked selector take an object argument, but there are LOTS of calls that
take a primitive type(s) as their argument(s).


Is there some solution that I'm completely missing?

You can call objects that take primitive arguments in the main thread by creating an NSInvocation, setting it up to call the method with the primitive, making it retain its arguments, and then invoking the NSInvocation in the main thread.


Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________ 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
  • Follow-Ups:
    • Re: performSelectorOnMainThread for a selector with a primitive argument
      • From: Martin Hairer <email@hidden>
References: 
 >performSelectorOnMainThread for a selector with a primitive argument (From: Eric Crichlow <email@hidden>)

  • Prev by Date: Re: performSelectorOnMainThread for a selector with a primitive argument
  • Next by Date: Re: performSelectorOnMainThread for a selector with a primitive argument
  • Previous by thread: Re: performSelectorOnMainThread for a selector with a primitive argument
  • Next by thread: Re: performSelectorOnMainThread for a selector with a primitive argument
  • Index(es):
    • Date
    • Thread