• 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: NSThread call back...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSThread call back...


  • Subject: Re: NSThread call back...
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 9 Nov 2005 09:57:59 -0800

On Nov 9, 2005, at 9:25 AM, Brian O'Brien wrote:

When an NSThread wishes to communicate with the object that created it,
how can one arrange that the thread calls a method of the creator class?


Is this one possible use of the withObject parameter of the NSThread detechNewThreadSelector method?
If so what is the syntax for passing the method as a parameter?

You can pass the detacher to the thread, and then invoke on the detacher -performSelectorOnMainThread:withObject:waitUntilDone: to have the specified selector invoked on the detacher.


Rather than trying to pass a selector and object into your thread (which you could pass as an NSInvocation) you can just pass an object and have a well-known selector to send to that object from the thread.

  -- Chris

_______________________________________________
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: 
 >NSThread call back... (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Re: [NSCoder versionForClassName] gives the current version?
  • Next by Date: Fwd: Pb with object release
  • Previous by thread: NSThread call back...
  • Next by thread: Re: NSThread call back...
  • Index(es):
    • Date
    • Thread