• 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
Confused with modal sessions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Confused with modal sessions


  • Subject: Confused with modal sessions
  • From: Mike Abdullah <email@hidden>
  • Date: Wed, 3 May 2006 15:21:23 +0100

I need some advice on what I am doing wrong trying to sort out a modal session.

In my app, the user clicks a menu item to perform a task. Now this task takes a few seconds so I need to display a panel telling them that the task is in progress. I cannot spin this off into another thread since most of the work done is using NSAppleScript which explicitly says it should not be used in a thread.

I had assumed that I could do [NSApp beginModalSessionForWindow: progressPanel], record the result and then do [NSApp runModalSession:] after. Once the processing is complete, I call [NSApp endModalSession:] with the modal session from before. However, this doesn't seem to work.

The panel I'm bringing up with the beginModalSessionForWindow: method never goes away when I call endModalSession:

What am I doing wrong?  Should I even be using a modal session?
_______________________________________________
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


  • Follow-Ups:
    • Re: Confused with modal sessions
      • From: Keary Suska <email@hidden>
  • Prev by Date: [SOLVED] Re: Updating NSTableView after edit
  • Next by Date: Re: saveGraphicsState vs. lockFocus
  • Previous by thread: [SOLVED] Re: Updating NSTableView after edit
  • Next by thread: Re: Confused with modal sessions
  • Index(es):
    • Date
    • Thread