home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21060 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  1.3 KB

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