Sending NSString to NSThread task
Sending NSString to NSThread task
- Subject: Sending NSString to NSThread task
- From: "Peter Karlsson" <email@hidden>
- Date: Wed, 15 Dec 2004 11:10:43 +0100
Dear list!
How do I send the NSString 'action' in myAction to the threadTask? Here is
my code.
- (void)myAction:(NSString*)action
{
>>>I have the string here
// start thread
[NSThread detachNewThreadSelector:@selector(threadTask) toTarget:self
withObject:nil];
}
- (void)threadTask
{
NSAutoreleasePool *pool = [NSAutoreleasePool new];
>>>I need the string here
// exit thread
[pool release];
[NSThread exit];
}
Best regards Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden