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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!uchinews!a-giles
  3. From: a-giles@uchicago.edu (Aaron Giles)
  4. Subject: Re: GWorlds and Windows - a problem....
  5. In-Reply-To: grass@cs.uchicago.edu's message of Sun, 10 Jan 1993 22:59:29 GMT
  6. Message-ID: <A-GILES.93Jan10234048@opal1.uchicago.edu>
  7. Sender: news@uchinews.uchicago.edu (News System)
  8. Reply-To: a-giles@uchicago.edu
  9. Organization: University of Chicago High Energy Physics
  10. References: <1993Jan8.233136.18543@cs.ucla.edu> <1ililcINNo5d@cat.cis.Brown.EDU>
  11.     <1993Jan10.225929.1773@midway.uchicago.edu>
  12. Date: Mon, 11 Jan 1993 05:40:48 GMT
  13. Lines: 36
  14.  
  15. In article <1993Jan10.225929.1773@midway.uchicago.edu> grass@cs.uchicago.edu (Joshua Grass) writes:
  16.  
  17. >>You probably need to move the SetGWorld call before NewCWindow.  QuickDraw
  18. >>does an amazingly good job of crashing when the port is set to an offscreen
  19. >>GWorld at the wrong time.  (I had a TCL app which drew in an offscreen port
  20. >>while updating a progress bar.  The number of times I restarted while
  21. >>debugging is best left unsaid.)
  22.  
  23. >One problem might also be the think c has an error in its mac library with
  24. >NewCWindow, namely that it returns a window, not a cwindow.  I've fixed mine
  25. >and recompiled it and alot of color window stuff works now.  This is with
  26. >ver 5.0. newer versions might have fixed this fairly glaring problem.
  27.  
  28. Sorry, but this isn't an error.  The only difference between a
  29. CWindowRecord and and WindowRecord is that the former contains a
  30. CGrafPort and the latter a GrafPort.  Seeing as these two port records
  31. are purposefully the same size (otherwise all hell would've broken
  32. loose with the introduction of color!), all the window-specific fields
  33. are at the same location in both WindowRecords and CWindowRecords.  I
  34. don't know why your color window stuff didn't work the other way, but
  35. changing the definition isn't the real solution to the problem.
  36.  
  37. To quote from the new IM: Toolbox Essentials tome:
  38.  
  39. pascal WindowPtr NewCWindow(void *wStorage, const Rect *boundsRect,
  40.                             ConstStr255Param title, Boolean visible,
  41.                             short procID, WindowPtr behind,
  42.                             Boolean goAwayFlag, long refCon);
  43.  
  44. And I believe it's been that way all along.  (BTW, the THINK C headers
  45. in version 5.0+ are just the MPW C headers with small modifications;
  46. more than likely, the original function prototype was written by
  47. Apple, not by Symantec).
  48.  
  49. Aaron
  50. a-giles@uchicago.edu
  51.