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 protected])

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