🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #20463

Re: Hypercard again (radio button)

#20463
From: Charles C. Allen
Date: Sun, 18 Oct 1987 00:59
45 lines
2015 bytes
Well, I've yet to see the following method appear, so I'll toss it
out.  It has the advantage of not having to loop through all the
buttons in a cluster at any point.

    *	Create a new background field (named "direction" here).  This
	should probably be hidden.  It's just a place to store info.

    *	Create a new, named background radio button.  Setting
	autoHilite works well.

    *	Include the following in the button's script:

	on mouseUp
	   setDirection the short name of me
	end mouseUp

    *	Duplicate the button as many times as you need (don't forget
	to rename the clones).

    *	In either the background script or the stack script, include
	the following handlers:

	on openCard
	   set hilite of bkgnd button field "direction" to true
	end openCard

	on closeCard
	   set hilite of bkgnd button field "direction" to false
	end closeCard

	on setDirection dir
	   set hilite of bkgnd button field "direction" to false
	   put dir into field "direction"
	   set hilite of bkgnd button dir to true
	end setDirection

This avoids having to loop over the buttons in the cluster at any
point, and you can add a new button to the cluster by just cloning an
existing one.

It looks reasonable with radio buttons, but icon buttons flash when
chosen with this method.  Handling icon buttons properly is left as an
exercise for the reader :-)

Charlie Allen		cca@newton.physics.purdue.edu
Technical Details
Message-ID: <909@pur-phy>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!iuvax!pur-ee!pur-phy!cca
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!rutgers!iuvax!pur-ee!pur-phy!cca
From: cca@pur-phy (Charles C. Allen)
Newsgroups: comp.sys.mac
Subject: Re: Hypercard again (radio button)
Message-ID: <909@pur-phy>
Date: Sat, 17-Oct-87 20:59:48 EDT
Article-I.D.: pur-phy.909
Posted: Sat Oct 17 20:59:48 1987
Date-Received: Sun, 18-Oct-87 13:13:12 EDT
References: <30200@sun.uucp> <166@stech.UUCP> <179@scdpyr.UUCP>
Organization: Purdue Univ. Phys Dept, W.Lafayette, IN
Lines: 45
Summary: another radio cluster method...