Re: How do I cancel beginSheet: before the next run loop?
Re: How do I cancel beginSheet: before the next run loop?
- Subject: Re: How do I cancel beginSheet: before the next run loop?
- From: email@hidden
- Date: Fri, 15 Mar 2002 18:04:44 -0800
While performing a lengthy operation, I display a sheet with a progress
bar and a cancel button. How would I receive a click in the Cancel
button while I'm monopolising the run loop? I thought I could tell the
currentRunLoop to periodically check for queued events, but that hasn't
been successful. I also don't want any views other than the sheet's
progress bar to update until the operation is done. (That's what
happened when I tried advancing the run loop manually.)
It sounds to me like you want to be doing your "lengthy operation" in
a background thread which is cancellable from the main thread if the
user hits the Cancel button. If that sounds like a good idea to you,
you should check the archives for information on doing this; it is a
very frequently discussed topic, so there are reams and reams of ideas,
example code, etc.
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.