show card1

Cubist at aol.com Cubist at aol.com
Sat Jan 22 17:47:41 CST 2005


sez ps1 at softseven.org:
>on openstack
>   show card1
>end openstack
>
>Should this code make card1 visible when run?
   "Show" and "hide" don't really work on *individual cards* within a stack. 
You can show/hide components on a card, you can show/hide entire stacks, but 
you can't show/hide cards in a stack. Interestingly, and perhaps analogously, 
you also can't show/hide specific words within a field; try "hide word 2 of 
field 'Fred'", for instance, and *the entire field* will be hidden, not just word 
2 within that field.

>If it should then it don't, my question is why?
   When a stack opens, the first card in that stack automatically appears on 
screen, provided that you haven't played any funky games like opening the 
stack to a hidden window or something. This being the case, "show card1" seems 
like it'd be kind of redundant even if you *could* show/hide individual cards... 
*unless* "card1" ISN'T the first card in that stack. In that case, you 
probably want "go to card1" instead.
   If card1 is the actual name of the specific card you want to display: I'd 
recommend putting it in quote-marks. Yes, Rev *can* figure it out anyway, but 
sometimes Rev gets it wrong...
   If you left the quote-marks off *on purpose*, because card1 is a variable, 
and you want to show the card whose name is in that variable: In the code you 
supplied, the contents of the variable card1 aren't defined. If the contents 
of the variable card1 truly *aren't* defined *anywhere*, you'll get an error 
message -- try "hide field" or "hide button" *without* specifying *which* 
field/button, and you should get the same error. Liikewise, "go to card" *without* 
specifying *which* card should give you that same error.

   Hope this helps...


More information about the use-livecode mailing list