[Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task
[Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task
- Subject: [Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task
- From: JongAm Park <email@hidden>
- Date: Thu, 01 Sep 2011 09:33:26 -0700
Hello,
I wrote codes to processing images on a second thread and the main thread displays and handles "progress dialog box".
Because it is not possible to create a "UI thread" according to Cocoa framework, I had the main thread process the progress dialog box, while a second thread process images.
However, a problem occurred when I decided to create QuickTime movie files with the processed images on the second thread.
It turned out that QuickTime movie can't be created on a second thread, which is not a main thread.
An uncaught exception was raised
QTMovie_QuickTime class must be initialized on the main thread.
*** Terminating app due to uncaught exception 'QTMovieInitializedOnWrongThread', reason: 'QTMovie_QuickTime class must be initialized on the main thread.'
Then, is there any code pattern or example to handle progress dialog and time consuming tasks in a main thread without blocking user interaction?
Or a solution doesn't need to be confined in that model. If it can utilize a second thread, it is better.
Can anyone share his/her idea with me?
Thank you.
JongAm Park_______________________________________________
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