Path: utzoo!attcan!uunet!husc6!rutgers!psuvax1!psuvm.bitnet!cunyvm!byuvax!taylorj From: taylorj@byuvax.bitnet Newsgroups: comp.sys.mac.hypercard Subject: Re: Faster Button Message-ID: <258taylorj@byuvax.bitnet> Date: 8 Oct 88 04:38:45 GMT Lines: 20 I hope some of you paid close attention to the very good advice Kjell Krona gave in message <1180@ttds.UUCP). He made the very important point that if you have a script that needs to be repeated in a lot of buttons, you don't need to duplicate it for every button. In fact, the buttons DON'T EVEN HAVE TO HAVE SCRIPTS. To reiterate Kjell's message, move the mouseUp handler to the card, background, or even stack script. If you need to differentiate between buttons, use the button name to identify the different classes of buttons, then have your mouseUp handler check the "name of the target" and act accordingly. You can even put "parameters" in the button names. This can make your stacks MUCH smaller and much easier to modify. The cardinal rule of good, structured HyperTalk programming is "If it's duplicated, move it up the heirarchy!" Jim Taylor Microcomputer Support for Curriculum, Brigham Young University BITNET: taylorj@byuvax.bitnet INTERNET: taylorj@yvax.byu.edu