Re: performSelectorOnMainThread fails second time through
Re: performSelectorOnMainThread fails second time through
- Subject: Re: performSelectorOnMainThread fails second time through
- From: Gideon King <email@hidden>
- Date: Wed, 8 Dec 2010 14:57:19 +1000
Interesting:
1. No.
2. No.
Weird...
Now I thought it would be interesting to try those calls before the thread was dispatched, and the terminate one worked, but the run loop stop didn't. I also tried the runloop stop one in my mini test application, and it didn't work there either, so am a bit suspicious of that. Should that kill any application? If so, then maybe there is something wrong on my machine which is showing up in different ways with different apps. I have recently installed the latest XCode. Might try this on another computer and see if that makes any difference.
I also checked my build settings, and it was set to use the current MacOS as the base SDK (i.e. 10.6), and the architecture was set to be 32 bit universal, so I changed that to native architecture of build machine. That made no difference.
So, no luck so far ... thanks for the suggestions though...
Gideon
On 08/12/2010, at 2:36 PM, Dave Keck wrote:
> Some thoughts:
>
> 1. What happens if you specify a different object to receive the
> message? For example, try [NSApp performSelectorOnMainThread:
> @selector(terminate:) ... waitUntilDone: YES]. Does your app
> terminate?
>
> 2. Specify waitUntilDone: NO, and after the call to
> -performSelectorOnMainThread:, call:
>
> CFRunLoopStop(CFRunLoopGetMain());
>
> Does that make it work?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden