Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucsd!hub!6600pete From: 6600pete@ucsbuxa.ucsb.edu Newsgroups: comp.sys.mac.programmer Subject: who caps the window list with nil and when? Message-ID: <3858@hub.UUCP> Date: 7 Feb 90 09:46:25 GMT Sender: news@hub.UUCP Lines: 23 Page I-277 of Inside Mac says: "NextWindow is a pointer to the next window in the window list, that is, the window behind this window. If this window is the farthest back (with no windows between it and the desktop), nextWindow is NIL." But it ain't necessarily so. In the midst of throwing together a quick FKEY, I needed to see if there were at least two windows open. So I checked FrontWindow and if it wasn't NIL I checked WindowPeek(FrontWindow)^.nextWindow to see if IT was NIL. Turns out that NewWindow doesn't cap the end of the window list with NIL like I would have expected it to. Lots of existing apps don't know about this and don't care. So who's supposed to cap the window list and why doesn't NewWindow do it? How can I check for two windows open without creating cosmetic ruination? ------------------------------------------------------------------------------ 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