FROM : Thomas Engelmeier
DATE : Thu Mar 13 10:16:13 2008
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 ':'.
DATE : Thu Mar 13 10:16:13 2008
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 ':'.
| Related mails | Author | Date |
|---|---|---|
| Nick Rogers | Mar 13, 02:27 | |
| John Stiles | Mar 13, 02:30 | |
| Nick Rogers | Mar 13, 02:32 | |
| John Stiles | Mar 13, 02:44 | |
| Nick Rogers | Mar 13, 03:00 | |
| Dave Hersey | Mar 13, 03:03 | |
| Thomas Engelmeier | Mar 13, 10:16 |






Cocoa mail archive

