[comp.sys.mac.hypercard] More Bkgnd Button ?s...

KOFOID@cc.utah.edu (05/01/90)

Jonathon Dick writes:

>  [preamble...]
>  on opencard
>    hide bkgnd button "Main Menu"
>  end opencard
>  
>  on closecard
>    show bkgnd button "Main Menu"
>  end closecard
>  
>  ....and a number of variations.  What happens is that the button hides just
>  fine, but the show command is getting confused.  When I try to leave the
>  card, I get a dialog box asking "Where is Background Button Main Menu?"
>  
>  Does anyone know what causes this?

    I just finished setting up a test stack exactly per above and it worked as
it ought to. Therefore, you are doing something strange which you haven't
noticed yet. For instance, do you have an option-space separating the word
"Main" from "Menu" in your closeCard handler?

    Cheers,

        Eric.

 __________________________________________________________________
|                          (801) 581-3592                          |
|  Snail: Eric Kofoid; Dept. Biology, U. of Utah; SLC, UT 84112    |
|   Fast: bi.kofoid%science@utahcca (BitNet)                       |
| Faster: bi.kofoid@science.utah.edu (InterNet)                    |
|Fastest: kofoid@bioscience.utah.edu (InterNet -> QuickMail)       |
|                                                                  |
| -- The University of Utah is blameless for anything I've said -- |
|__________________________________________________________________|

englfz@jetson.uh.edu (05/03/90)

In article <7014@ur-cc.UUCP>, jdic@uhura.cc.rochester.edu (Jonathan Dick) writes:
> A few articles back, I posted a question regarding hiding background buttons.
> Thanks to those of you who offered suggestions.  I've tried a couple of
> them, and while some succeeded, one did not.  A brief recap:
> 
>    I have these five navigation buttons that I use on every card in the
>    stack, except one.  One this one card, I'd like to hide & disable the
>    bkgnd buttons.
> 
> Most suggestions I received were along the lines of covering them with an
> opaque button that did nothing.  While this seems to work, it seems
> somewhat inelegant, so I tried the following suggestion in the card script:
> 
> on opencard
>   hide bkgnd button "Main Menu"
> end opencard
> 
> on closecard
>   show bkgnd button "Main Menu"
> end closecard
> 
> ....and a number of variations.  What happens is that the button hides just
> fine, but the show command is getting confused.  When I try to leave the
> card, I get a dialog box asking "Where is Background Button Main Menu?"
> 
> Does anyone know what causes this?
> 

Check to see if the command you are using is actually "Show".  The only time
I've come across the "Where is..." dialog box is when I use the "OPEN..."
command.  If you are inadvertently telling HyperCard to "Open button X",
HyperCard will think that "button X" is the name of a stack somewhere.  If
HyperCard couldn't find a hidden button, I believe you would get a message
like: "NEVER HEARD OF BACKGROUND BUTTON NAMED X".

If the problem doesn't lie in your code, the only suggestion I have is to
make sure that you are really still on the same background as the hidden
button.

Hope this helps!

------------------------------------------------------------------------------
Ed Gibler                           University of Houston
ENGLFZ@uhvax1.uh.edu                English Computer Writing Lab
------------------------------------------------------------------------------