Terminating a thread...
Terminating a thread...
- Subject: Terminating a thread...
- From: John Cebasek <email@hidden>
- Date: Mon, 2 Mar 2009 09:58:05 -0500
Hi All:
I've got an NSThread that copies some data from one database to
another. While the copy is occurring, there's a sheet that is updated
with the progress of the copy. On that sheet there's also a stop
button, so that if the user wants to stop the copy, he can.
I seem to be having some trouble trying to terminate the thread. In
the IBaction for the stop button, I've got:
-(IBAction)closeProgressDialog:(id)sender
{
DebugLog(@"%@", @"ConvertV1Database:closeProgressDialog");
[m_migrateThread cancel];
[self closeProgressDialogSheet];
}
Where m_migrateThread is obtained via:
m_migrateThread = [[NSThread alloc] initWithTarget:self
selector:@selector(convertDatabaseToSQLite3:)
object:nil];
[m_migrateThread start];
Any hints on what I might be doing wrong?
Thanks in advance for your time
John
_______________________________________________
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