[comp.sys.mac.hypercard] Finding a specific card a la "Link To..."

janin@nntp-server.caltech.edu (Adam L. Janin) (06/28/91)

---

I would like a simple way of obtaining the id of a specific
card the user chooses, much in the way that the "Link To" button
in the button dialog box functions.  I _could_ just create a button,
fake a click on the "Link To" button, and extract the selected id
from the button's script, but that's really ugly.  Is there a more
elegant way?  Is it possible to use the Link To palette manually?

	Thanks,

	Adam Janin
	janin@gap.caltech.edu

bcarter@claven.idbsu.edu (Bruce Carter) (06/28/91)

In article <1991Jun27.182233.4298@nntp-server.caltech.edu>
janin@nntp-server.caltech.edu (Adam L. Janin) writes:
>I would like a simple way of obtaining the id of a specific
>card the user chooses, much in the way that the "Link To" button
>in the button dialog box functions.  I _could_ just create a button,
>fake a click on the "Link To" button, and extract the selected id
>from the button's script, but that's really ugly.  Is there a more
>elegant way?  Is it possible to use the Link To palette manually?

I don't know of a way to use the "Link To" palette manually, but you could make
your own palette and trigger it manually with a button or programatically from
a script.  Depending upon what you want to do it could be pretty easy.  Just
stuff the initiating location in a global variable (like startlink) so you can
jump back to it, bring up the palette with navigational buttons and a "Link to
this location" button of some sort, and when the "Link" button is pressed "put
the id of this card into endLink" or some such global and return to where you
started using the information that you stored in the startLink global.

If you get stuck with the scripting give another yell.
                                     <->
Bruce Carter, Courseware Development Coordinator      bcarter@claven.idbsu.edu
Boise State University, Boise, ID  83725              duscarte@idbsu.bitnet
(This message contains personal opinions only)        (208)385-1250@phone