Re: How to do a progress window the "right way"?
Re: How to do a progress window the "right way"?
- Subject: Re: How to do a progress window the "right way"?
- From: Frederick Cheung <email@hidden>
- Date: Sat, 25 Sep 2004 13:11:04 +0200
On 25 Sep 2004, at 13:00, Daniel Tapie wrote:
Hi,
I'd like to be able to display a progress window (with a cancel
button) for a QuickTime movie export process.
It is apparently a simple challenge, but I'm am running into a few
problems:
- the MovieExport component is NOT thread-safe, so I cannot do the
export from a separate thread
- the only way to update the display and handle events during the
export is through the QT callback mechanism (which works fine and
enables me to call Cocoa routines thanks to an autorelease pool I've
set up.
- I am able to determine the position of the Cancel button and
therefore check if the mouse has been clicked in that rectangle BUT
the problem comes when the user moves the Window because the window
frame is not updated until the MovieExport process finishes. Since
Cocoa does not provide a way to "lock" a window to a specific
position, I'm stuck here...
So, because of all these closed doors, I wondered if there was a
recommended way to provide feedback to the user and allow the user to
cancel these kinds of processes.
Thanks for any pointers you might have,
You could run the export in a separate cooperative thread and give
time to your main thread running the progress window etc. by calling
YieldToAnyThread from the callback.
Fred
_______________________________________________
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