Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!vtserf!creatures!csgrad!davism From: davism@csgrad.cs.vt.edu Newsgroups: comp.sys.mac.programmer Subject: Re: Problems with 'cicn's Summary: Solved!! Message-ID: <1327@creatures.cs.vt.edu> Date: 27 Jun 91 19:15:50 GMT Article-I.D.: creature.1327 References: <1326@creatures.cs.vt.edu> Sender: usenet@creatures.cs.vt.edu Reply-To: davism@vtopus.cs.vt.edu (Mat Davis) Organization: Virginia Tech Computer Science, Blacksburg, VA Lines: 25 In article <1326@creatures.cs.vt.edu> davism@vtopus.cs.vt.edu (me) writes: >I'm trying to get "bouncing" buttons working using color icons. >... >I discovered in THINK C that the icon mask doesn't appear to be valid >until *after* the cicn is drawn the first time (with PlotCIcon), but >I'm not trying to use it until after the first draw. I tracked down the problem: apparently the mask is only valid just after a call to PlotCIcon and is subject to some kind of trashing later. I finally reorganized the code so that the mask is never used except just *after* it's been drawn. That isn't the most logical way to structure it, but it appears to be the only way that works. I'd suggest one or more of the following changes: 1. Make the internal structures valid at all times 2. Document the times that they *are* valid 3. Don't document the internals. Anyway, another bug bites the dust!! -------------------------------------------------------------------------- Mat Davis Virginia Tech --------------------------------------------------------------------------