🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #20401

Re: Hypercard again (radio button)

#20401
From: Darryl Richman
Date: Thu, 15 Oct 1987 18:57
51 lines
2576 bytes
In article <179@scdpyr.UUCP> faulkner@scdpyr.UUCP (Bill Faulkner) writes:
=NO NO NO NO!  You don't understand radio buttons at all! If you click on
=a hilited radio button it should remain on.  And for radio buttons,
=Autohilite is NOT the way to proceede.  I know, because I have developed
=a stack that uses radio buttons.

Umm, can we keep the hysteria level down?  Thanks.

=Now to answer Chuq's question about how to develop radio buttons.
=
=First, create the set of buttons that you want to use as a set of radio
=buttons and organize them in a logical manner.  Set the Autohilite to off
=and show name to on.

So far, so good.

=                      Say you have five buttons numbered 1-5.  The script
=for button number 1 would be like this:
=
=on mouseUp
=  set hilite of button 2 to false
=  set hilite of button 3 to false
=  set hilite of button 4 to false
=  set hilite of button 5 to false
=  set hilite of button 1 to true
=  --
=  --  do what ever this button is supposed to do
=  --
=end mouseUp

Now, rather than place this script in each button, where you'll have to
go back and modify each one when you add/delete another button, do it this
way:

    1.  Add a script, "on clearButtons" (or whatever), to the card or
	background (as appropriate for your stack).  clearButtons sets
	the hilite of all of the buttons in the group to false.  I have
	a stack with several groups, so each has its own clearXxx handler.

    2.	In each button, create "on mouseUp" as follows:
	on mouseUp
		send clearButtons to this {card,background}
		set hilite of me to true
	end mouseUp

This same script can now be copied (pretzel C in the script editor) and
pasted (pretzel V) into each button, without changes.
-- 
Copyright (C) 1987 Darryl Richman	INTERACTIVE Systems Corporation
    The views expressed above are	...!cca!ima!ism780c!darryl
	     those of the author.	...!sdcrdcf!
Technical Details
Message-ID: <7517@ism780c.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bloom-beacon!think!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!sdcrdcf!ism780c!darryl
References: <30200@sun.uucp> <166@stech.UUCP> <179@scdpyr.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bloom-beacon!think!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!sdcrdcf!ism780c!darryl
From: darryl@ism780c.UUCP (Darryl Richman)
Newsgroups: comp.sys.mac
Subject: Re: Hypercard again (radio button)
Message-ID: <7517@ism780c.UUCP>
Date: Thu, 15-Oct-87 14:57:39 EDT
Article-I.D.: ism780c.7517
Posted: Thu Oct 15 14:57:39 1987
Date-Received: Sat, 17-Oct-87 16:54:51 EDT
References: <30200@sun.uucp> <166@stech.UUCP> <179@scdpyr.UUCP>
Reply-To: darryl@ism780c.UUCP (Darryl Richman)
Organization: Interactive Systems Corp., Santa Monica CA
Lines: 51