Re: performSelectorOnMainThread Help
Re: performSelectorOnMainThread Help
- Subject: Re: performSelectorOnMainThread Help
- From: Peter Sagerson <email@hidden>
- Date: Mon, 6 Oct 2008 19:43:50 -0700
You appear to have declared updateAirDate: to be an instance method,
but you're sending the message to the class. You want something more
like
[appDelegate performSelectorOnMainThread:@selector(updateAirDate:)
withObject:airDate waitUntilDone:NO];
where appDelegate is the relevant instance of MyApp_AppDelegate.
On Oct 6, 2008, at 7:13 PM, Sandro Noel wrote:
Greetings.
I need to gain a better understanding of performSelectorOnMainThread
I have my main window that had a delegate and the delegate spawns
threads, once the threads(NSOperation) are done they return a string,
I use to do it thru a delegate but Core Data does not appreciate
multiple access at the same time:)
so I looked at the synchronization mechanisms and I would like to
use the performSelectorOnMainThread.
I defined a selector in my Aplication delegate like this.
- (void) updateAirDate:(ShowAirDateItem *)showAirDateItem;
and i call it from my thread like this.
[MyApp_AppDelegate
performSelectorOnMainThread:@selector(updateAirDate:)
withObject:airDate waitUntilDone:NO];
unfortunately, this gives me this message in the run log.
*** +[MyApp_AppDelegate updateAirDate:]: unrecognized selector sent
to class
I know i'm not doing this right, but i cant figure it out... must be
to simple.
could someone point me in the right direction ?
thank you !
Sandro.
_______________________________________________
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:
@ignorare.net
This email sent to email@hidden
_______________________________________________
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