Re: NSThread call back...
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