Path: utzoo!mnetor!uunet!mcvax!enea!tut!santra!jmunkki From: jmunkki@santra.UUCP (Juri Munkki) Newsgroups: comp.sys.mac.hypercard Subject: Re: Computer Science analysis of HyperTalk wanted Message-ID: <12247@santra.UUCP> Date: 23 Apr 88 09:01:43 GMT References: <50156@sun.uucp> Reply-To: jmunkki@santra.UUCP (Juri Munkki) Distribution: comp Organization: Helsinki University of Technology, Finland Lines: 44 In article <50156@sun.uucp> DATJN@NEUVM1.Bitnet (Jakob Nielsen Tech Univ of Denmark) writes: >If I have *two* set of radio buttons of this kind and remove a button >from the bottommost set, then the numbers of the buttons in the >topmost set will all be diminished by one - instant bug! Here's what I would do, if I wanted radio buttons with hypercard. You have to have a special "findRadio" for the first button of the group. All the other buttons can have the same "findRadio". All the buttons have the same mouseUp. -- First button script for findRadio on findRadio global count add 1 to count put count end findRadio -- findRadio for other than first button in group on findRadio global theButton,count add 1 to count subtract 1 from theButton send findRadio to Button theButton end findRadio on mouseUp global theButton,count put the number of the target into theButton put 0 into count send findRadio end mouseUp Note that this program doesn't actually do any highlighting, but it does tell you which button in a script was hit. The highlighting and button handling code can be written into the first findRadio. Ok, now flame me... Juri Munkki Helsinki University of Technology Computing Centre jmunkki@santra.hut.fi jmunkki@fingate.bitnet