Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga.programmer Subject: Re: Problems with changing display Message-ID: <21589@cbmvax.commodore.com> Date: 15 May 91 15:28:26 GMT References: <52749@apple.Apple.COM> <21505@cbmvax.commodore.com> <52861@apple.Apple.COM> Reply-To: peter@cbmvax.commodore.com (Peter Cherna) Organization: Commodore-Amiga, Inc. West Chester, PA. Lines: 37 In article <52861@apple.Apple.COM> farrier@Apple.COM (Cary Farrier) writes: >That was it. Is it safe to walk and alter the message list the way that >StripIntuiMessages() does, though? I just thought that it wasn't >nice to go mucking about in the system's data structures from my code, >since those resources don't belong to my code. Generally you're correct, and you can't go mucking in the system's data structures. However, some things are open for access, with arbitration. List operations are atomic with respect to Forbid(), so you can normally traverse a list you don't own under Forbid(). I wouldn't recommend it without good reason, and you certainly can't wantonly Remove() nodes. In the particular case of CloseWindowSafely(), there was no other way to go, and Intuition is known to be able to handle the "abuse" of CWS(). Actually, there is a tiny vulnerability of CWS() that has been compensated for by an extra test inside Intuition 2.0. One of the downsides of the occasional legal or necessary access to system structures is that it creates the impression that it's open season on private data. A certain amount of the compatibility problems that early versions of 2.0 suffered is attributable to developers peeking or poking in places they shouldn't. Where reasonable, possible, and where it didn't seriously compromise the integrity of the OS, the system has been modified to let such applications continue to run. A good example is overscanning screens, where the developer can't really be blamed since there was for a while no "official" way of doing it, so people invented a number of techniques. Three or four different tricks are sniffed out and made to work. >-- Cary Peter -- Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com My opinions do not necessarily represent the opinions of my employer. "If all you have is a hammer, everything looks like a nail."