home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21148 < prev    next >
Encoding:
Text File  |  1993-01-10  |  1.7 KB  |  44 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!uchinews!grass
  3. From: grass@cs.uchicago.edu (Joshua Grass)
  4. Subject: Re: GWorlds and Windows - a problem....
  5. Message-ID: <1993Jan10.225929.1773@midway.uchicago.edu>
  6. Sender: news@uchinews.uchicago.edu (News System)
  7. Organization: Department of Computer Science, University of Chicago
  8. References: <1993Jan8.233136.18543@cs.ucla.edu> <1ililcINNo5d@cat.cis.Brown.EDU>
  9. Date: Sun, 10 Jan 1993 22:59:29 GMT
  10. Lines: 32
  11.  
  12. In article <1ililcINNo5d@cat.cis.Brown.EDU> ST202153@brownvm.brown.edu () writes:
  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.  
  37. One problem might also be the think c has an error in its mac library with
  38. NewCWindow, namely that it returns a window, not a cwindow.  I've fixed mine
  39. and recompiled it and alot of color window stuff works now.  This is with
  40. ver 5.0. newer versions might have fixed this fairly glaring problem.
  41.  
  42.                             Joshua
  43.  
  44.