[comp.sys.mac.hypercard] "Too Much Recursion"?

armond@sdsu.UUCP (Armond Mehrabian) (06/29/88)

I'm getting the message "Too Much Recursion" as I try to leave one card
and "go to card ID xxxx".  There are alot of globals set, but all of the are
emptied before I get to the "go to card..", any suggestions ?? The stack is very
complex, so I don't know what else to say about it, but if anyone has any ideas
what may be cuasing this, I'd appreciate a reply.
thanks

benjamin_kuo@pedro.UUCP (Benjamin Kuo) (07/06/88)

Something is trying to create an infinite loop... The best way to get through 
this is to trace your program execution... 

armond@sdsu.UUCP (Armond Mehrabian) (07/12/88)

In article <452@pedro.UUCP>, benjamin_kuo@pedro.UUCP (Benjamin Kuo) writes:
> 
> 
> Something is trying to create an infinite loop... The best way to get through 
> this is to trace your program execution... 

  Back to the problem. Is there any difficulty in having a "goto card #" in
  the script for a card.  What is happening is tha I'm trying to simply go
  between two cards, if I do it in a buton it works o.k., but if I do it in the
  the script for a card, it will work three times back and forth, then "to much
  recursion". Does "goto" close the card when it goes to another card, or does
  it just wait for me to "exit" from the called card.

     Thank you in advance.

benjamin_kuo@pedro.UUCP (Benjamin Kuo) (07/22/88)

Aha!  Are you using ON OPENCARD?  That's probably your big problem-  When you 
open up the stack, EVERY SINGLE TIME, it will repeat that operation. 
Diagram of your problem: 
  
      Card 1 (go to card 2) ------------> Card 2 (go to card 1) 
                          <-------------- 
  
It will continue to go on and on and on... 
  
It's just an infinite back and forth run, and after 2 or 3 of those HC goes 
wacko.  _Don't_ put go to card xx commands in an opencard, you can get pretty 
confused.