home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!gumby!kzoo!k044477
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Subject: Re: GetColor bug (was RE: NON-QUICKDRAW GAMES)
- Message-ID: <1992Sep11.171207.28711@hobbes.kzoo.edu>
- Organization: Kalamazoo College
- References: <14973@mindlink.bc.ca> <28629@vedge.UUCP> <1992Sep11.005924.21955@dartvax.dartmouth.edu>
- Date: Fri, 11 Sep 1992 17:12:07 GMT
- Lines: 28
-
- Joe.Francis@dartmouth.edu (Joe Francis) writes:
- >brad@vedge.UUCP (Brad Fowlow) writes:
- >
- >> Any thoughts on a PM-friendly way to get back the "normal"
- >> system palette when my last paletted window dies,
- >> just as happens when the app quits?
- >
- >I'm hopeful that someone else will post a more elegant way, but one way
- >to do what you want is to detect when you are closing your only window,
- >EraseRect it's portRect, and set it's Palette to the system palette,
- >*then* close the window.
-
- On the puzzle page in develop #11 (available from ftp.apple.com), Kon &
- Bal write: "In 32-Bit QuickDraw David Van Brink extended the Palette
- Manager to include a routine called PaletteMgrExit. This routine is
- called automatically for you when your application quits, thus restoring
- the default color state."
-
- Macsbug doesn't know that word, but you might want to try snooping
- around (maybe step through ExitToShell, not that I'd like to try it).
- Maybe you could shut down and re-init the Palette Manager?
-
- Somehow I doubt that using an undocumented trap qualifies as an
- "elegant" solution, but I thought I'd pass it along...
- --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
- The essence of OOP: "After some hacking, I finally got the program to
- work, but I'm still not sure why." - David Marcovitz (marcovitz@uiuc.edu)
-