home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!news.Brown.EDU!news.Brown.EDU!news
- From: ST202153@brownvm.brown.edu ()
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: GWorlds and Windows - a problem....
- Date: Fri, 8 Jan 1993 23:01:06 EST
- Organization: Brown University - Providence, Rhode Island USA
- Lines: 23
- Message-ID: <1ililcINNo5d@cat.cis.Brown.EDU>
- References: <1993Jan8.233136.18543@cs.ucla.edu>
- NNTP-Posting-Host: brownvm.brown.edu
- News-Software: BNN via BNN_POST v1.0 beta
-
- In article <1993Jan8.233136.18543@cs.ucla.edu>, tj@kona.cs.ucla.edu (Tom
- Johnson) said:
- >When WORKING is defined as TRUE, the program executes successfully. When
- >it is FALSE, the program crashes at the NewCWindow() call.
-
- > SetGWorld(offWorld, nil);
- > PaintRect(&offR); // Just fill it w/ black
- >
- >#if !WORKING // this will crash spectacularly
- > wind = NewCWindow(nil, &windR, "\p", TRUE, zoomDocProc,
- > (WindowPtr) -1, TRUE, 0);
- >#endif
- >
- > SetGWorld(SavePort, SaveGD);
-
- You probably need to move the SetGWorld call before NewCWindow. QuickDraw
- does an amazingly good job of crashing when the port is set to an offscreen
- GWorld at the wrong time. (I had a TCL app which drew in an offscreen port
- while updating a progress bar. The number of times I restarted while
- debugging is best left unsaid.)
-
- Andrew Shearer
- st202153@brown.edu
-