home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!geraldo.cc.utexas.edu!rick
- From: rick@akbar.cc.utexas.edu (Rick Watson)
- Newsgroups: comp.sys.mac.programmer
- Subject: Forcing a process switch
- Date: 30 Dec 1992 06:04:42 GMT
- Organization: University of Texas at Austin
- Lines: 26
- Sender: r.watson@utexas.edu
- Distribution: world
- Message-ID: <1hre5qINNrc2@geraldo.cc.utexas.edu>
- NNTP-Posting-Host: akbar.cc.utexas.edu
- Keywords: process-manager, tooxbox-managers
-
- I have a trap patch that needs to invoke a modal dialog. Yes, I know
- this sounds strange, but please ignore that for now. The patch may be
- executed by any application at any time, including before the app has
- initialized any of the toolbox managers -- I won't know
- what state the app is in.
-
- My current implementation uses the process manager to launch another
- application to do the user interaction. I execute a GetNextEvent
- loop with a mask selecting no events to force the process switch.
- The launch works fine. Unfortunately, you can't call GetNextEvent
- until some of the toolbox managers have been initialized.
- Is there a workaround? I discovered that I could workaround the
- problem by setting the background only bit in the first app's
- size resource, but this is not an option for the case I'm trying
- to solve. Is there any way to make the current process a bkgnd only
- process for a short while?
-
- Alternatively, is there any way to detect which toolbox managers
- have been initialized? I could at least avoid crashing by not
- executing the patch code in the case where the app is in
- the wrong state.
-
- Rick Watson
- The University of Texas Computation Center, Networking Services, 512/471-3241
- r.watson@utexas.edu
-
-