Re: performSelectorOnMainThread for a selector with a primitive argument
Re: performSelectorOnMainThread for a selector with a primitive argument
- Subject: Re: performSelectorOnMainThread for a selector with a primitive argument
- From: Martin Hairer <email@hidden>
- Date: Thu, 16 Feb 2006 19:56:37 +0000
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.
I wrote a small category for NSObject that does just that. You can
simply invoke it by
a call that looks like
[[myObject inMain] mySelectior:arg1 otherarg:arg2];
I found this to be very useful. I can send you the code if you are
interested.
Regards,
Martin
HairerSoft
http://www.hairersoft.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