Re: performSelectorOnMainThread problem
Re: performSelectorOnMainThread problem
- Subject: Re: performSelectorOnMainThread problem
- From: Thomas Engelmeier <email@hidden>
- Date: Thu, 13 Mar 2008 10:16:13 +0100
On 13.03.2008, at 02:27, Nick Rogers wrote:
In my secondary thread I'm doing:
[self performSelectorOnMainThread:@selector(updateProgress)
withObject:data waitUntilDone:YES];
with the error that self does not recognize the selector
updateProgress.
I have imported the main AppController.h into this secondary class
file. still the problem.
You have two errors here:
- regardless which object implements the method, you need to send the
message _to that object_ and not to self.
Importing some header is not the magic bullet, Objective-C can not
guess which object might want to handle the message.
- the signature in @selector() is for sure wrong when you supply an
argument in "withData:". It lacks the trailing ':'.
_______________________________________________
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