Path: utzoo!attcan!uunet!salt.acc.com!ucsd!hub!6600pete From: 6600pete@ucsbuxa.ucsb.edu (GurgleKat [Pete Gontier]) Newsgroups: comp.sys.mac.programmer Subject: Re: who caps the window list with nil and when? Message-ID: <3872@hub.UUCP> Date: 7 Feb 90 23:30:08 GMT References: <25d0a2fa.7177@polyslo.CalPoly.EDU> Sender: news@hub.UUCP Reply-To: 6600pete@ucsbuxa.ucsb.edu Lines: 34 From article <25d0a2fa.7177@polyslo.CalPoly.EDU>, by rcfische@polyslo.CalPoly.EDU (Raymond C. Fischer): > To check for more than one _visible_ window, not only do you need to > follow the links, but you also need to make sure each window is visible. > The list _is_ capped with a NIL, but not all windows on the list are visible. Apparently, you're right, but in a strange way. I wrote a simple program to make "absolutely" (heh heh) sure that the window list wasn't getting capped. I set a breakpoint after the call to NewWindow and took a look at the window record with the debugger. Strangely, even though I KNEW I had made only one call to NewWindow, the list wasn't capped. I took this as "proof." Users of THINK Pascal, of course, already see the problem. THINK Pascal does screwy things with the window list so that the "last" window in the user's app has a nextWindow field that points to the "first" THINK Pascal environment window! One would have thought (another assumption gone wrong...) that if THINK Pascal were going to go to all the trouble it does go to to create an environment for the user app that it would also give the user app its own window list. Perhaps Rich Siegel is reading this and can say why this wasn't done... or that I'm totally wrong and THINK Pascal DOES in fact make a new window list for the user app. Now, I haven't been home to the Mac yet today, so I don't know if this is exactly what's happening in this case. But I remember having run into it before, so it makes a sort of crazy sense. I'll post something in confirmation or denial some time tonight. ------------------------------------------------------------------------------ Pete Gontier | InterNet: 6600pete@ucsbuxa.ucsb.edu, BitNet: 6600pete@ucsbuxa Editor, Macker | Online Macintosh Programming Journal; mail for subscription Hire this kid | Mac, DOS, C, Pascal, asm, excellent communication skills