home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!uchinews!a-giles
- From: a-giles@uchicago.edu (Aaron Giles)
- Subject: Re: GWorlds and Windows - a problem....
- In-Reply-To: grass@cs.uchicago.edu's message of Sun, 10 Jan 1993 22:59:29 GMT
- Message-ID: <A-GILES.93Jan10234048@opal1.uchicago.edu>
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: a-giles@uchicago.edu
- Organization: University of Chicago High Energy Physics
- References: <1993Jan8.233136.18543@cs.ucla.edu> <1ililcINNo5d@cat.cis.Brown.EDU>
- <1993Jan10.225929.1773@midway.uchicago.edu>
- Date: Mon, 11 Jan 1993 05:40:48 GMT
- Lines: 36
-
- In article <1993Jan10.225929.1773@midway.uchicago.edu> grass@cs.uchicago.edu (Joshua Grass) writes:
-
- >>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.)
-
- >One problem might also be the think c has an error in its mac library with
- >NewCWindow, namely that it returns a window, not a cwindow. I've fixed mine
- >and recompiled it and alot of color window stuff works now. This is with
- >ver 5.0. newer versions might have fixed this fairly glaring problem.
-
- Sorry, but this isn't an error. The only difference between a
- CWindowRecord and and WindowRecord is that the former contains a
- CGrafPort and the latter a GrafPort. Seeing as these two port records
- are purposefully the same size (otherwise all hell would've broken
- loose with the introduction of color!), all the window-specific fields
- are at the same location in both WindowRecords and CWindowRecords. I
- don't know why your color window stuff didn't work the other way, but
- changing the definition isn't the real solution to the problem.
-
- To quote from the new IM: Toolbox Essentials tome:
-
- pascal WindowPtr NewCWindow(void *wStorage, const Rect *boundsRect,
- ConstStr255Param title, Boolean visible,
- short procID, WindowPtr behind,
- Boolean goAwayFlag, long refCon);
-
- And I believe it's been that way all along. (BTW, the THINK C headers
- in version 5.0+ are just the MPW C headers with small modifications;
- more than likely, the original function prototype was written by
- Apple, not by Symantec).
-
- Aaron
- a-giles@uchicago.edu
-