[comp.sys.mac.hypercard] Help with buttons on a field

fsb@vitro.uucp (Steve Brailsford) (01/04/91)

Hi, I am pretty new to hypercard and have been having trouble
with something.  I have a stack written for hypercard 1.x.
I now have converted it to 2.0 and need to add something else.
I have text fields that give info.  In these text fields are
all capitalized words, like WORD, and I want to make a button
out of that word to get more info on that part of it.  I tried
replacing the word part with blanks in the field, and putting
a button with that word in its place.  But the button doesn't
show up.  I think in 1.2 you can't have a button in a field.
Is there a way to do it in 2.0?  Thanks for any help.
-- 
    Steve Brailsford		Usenet:  uunet!media!vitro!fsb
    Vitro Corporation		Compu$erve: 73427,1466
    14000 Georgia Ave.		Voice:  (301) 231-1481
    Silver Spring, MD 20906

ralph@world.std.com (Ralph Lombreglia) (01/08/91)

From article 2864:
>and I want to make a button
>out of that word to get more info on that part of it...
>...But the button doesn't show up...

Sounds like your button is in a layer "behind" the layer of the field,
and is thus obscured.  Try selecting the button, and then using "Bring
Closer" from the Objects menu.  (There are tools for making this
easier, including a some good utility scripts in Danny Goodman's
well-known HyperCard book.)

But your solution (buttons in a field) isn't a very elegant one,
unless the cards are completely locked and nailed down, and will never
have input from a user, etc.  (In which case, your buttons could be
transparent ones over those capitalized words.)  Also, your method
won't work with scrolling fields, in case you didn't realize that.

A better method for simulating hypertext in HyperCard 2.0 would be to
use the new "chunk" functions combined with the new "Group" text style
which 2.0 offers.  Look at the phrases in the Help stacks which have a
two-pixel gray underline; examine the scripts of those stacks and
you'll see how it works.  You still can't "link" words the way you can
with buttons, but in a fairly static stack, you can script some pretty
good hypertext-type results.

Ralph Lombreglia
Internet: ralph@world.std.com   MCI Mail: rlombreglia   Bix: rlombreglia