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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/psagers %40ignorare.net

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to