How do I cancel beginSheet: before the next run loop?
How do I cancel beginSheet: before the next run loop?
- Subject: How do I cancel beginSheet: before the next run loop?
- From: Itrat Khan <email@hidden>
- Date: Thu, 14 Mar 2002 12:39:31 -0500
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.)
So in summary, I want to display a progress sheet with [NSApp
beginSheet:modalForWindow:...], run my lengthy operation, and during
each iteration of my operation, check if the user has clicked the Cancel
button.
I'd greatly appreciate any suggestions.
Regards,
Itrat.
..................................................................
Itrat Khan
Modeless Software, Inc.
http://www.modeless.com
_______________________________________________
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.