• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How do I cancel beginSheet: before the next run loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Serious class cluster/toll free bridging question (was: Newbie (to Cocoa) questions)
  • Next by Date: Re: Why the name Cocoa?
  • Previous by thread: DERIVED_SOURCES_DIR
  • Next by thread: Re: How do I cancel beginSheet: before the next run loop?
  • Index(es):
    • Date
    • Thread