Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!psuvm!cunyvm!byuvm!byuvax!taylorj From: taylorj@yvax.byu.edu Newsgroups: comp.sys.mac.hypercard Subject: Re: Question about protocol for trapping menu items. Message-ID: <1982taylorj@yvax.byu.edu> Date: 30 Jan 91 05:18:21 GMT Lines: 23 In <48422@apple.Apple.COM>, jdevoto@Apple.COM (Jeanne A. E. DeVoto) writes: > on doMenu theItem > if theItem is "Compact Stack" then > close window "MyPalette" > send "doMenu Compact Stack" to HyperCard -- avoids recursion > palette "MyPalette", "345,80" > else pass doMenu > end doMenu Ok, but what if you're the top stack in the stacksInUse and there's another stack below you that also has a doMenu handler that closes its windows? If you send the command straight to HyperCard the other stacks never get it. I've been wrestling with this general problem (passing on a message so other stacks get it but still doing something after the message is "finished") and I haven't come up with a good solution. I've resorted to setting a global flag and checking it in an idle handler, but I don't really like doing it that way. Would it be better to find my stack's place in the stacksInUse list and send the message on to the following stack? Any suggestions? Jim Taylor Microcomputer Support for Curriculum | Brigham Young University | Bitnet: taylorj@byuvax.bitnet 101 HRCB, Provo, UT 84602 | Internet: taylorj@yvax.byu.edu