@selector not working with (id)anObject
@selector not working with (id)anObject
- Subject: @selector not working with (id)anObject
- From: Trygve Inda <email@hidden>
- Date: Sun, 12 Apr 2009 00:20:53 +0000
- Thread-topic: @selector not working with (id)anObject
[NSThread detachNewThreadSelector:@selector(threadMethod:) toTarget:self
withObject:@selector(myMethod)];
-(void)threadMethod:(id)anObject
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
SEL comp = (SEL)anObject;
... Do stuff ...
[self performSelectorOnMainThread:comp withObject:nil waitUntilDone:NO];
[pool release];
}
This crashes during detachNewThreadSelector. How can I pass a method to call
at the end of the thread processing as above?
Thanks,
Trygve
_______________________________________________
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