Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!carterbk From: carterbk@apple.com (Bryan 'STAKMan' Carter) Newsgroups: comp.sys.mac.hypercard Subject: Re: Recursion, etc... Message-ID: <699@internal.Apple.COM> Date: 16 Feb 89 19:34:59 GMT References: <3134@pixar.UUCP> Sender: usenet@Apple.COM Organization: Earth Lines: 34 In article <3134@pixar.UUCP> flip@pixar.UUCP (Flip Phillips) writes: > I have a background script wich, when it gets an openCard > message it waits a certain amount of time, then does a go to next > card. This is bad since this thing recurses... and hypercard complains > only a few cards into the stack. It is essentially a 'hands off' slide show, > i.e. the gotonextcard isnt imbedded in a mouseUp message, but is timed. > > is there another way i should be doing this? Many people have called me for help on this very problem. (I don't have the time to help everyone all the time, yet I love helping people out. This is a Catch Hyper22.) Never depend upon "openCard" handlers to control an automatic/slide-show type stack. Such a script should be done with one script, possibly calling sub-scripts for each card. By using the 'openCard' or 'closeCard' handlers, after about 5-7 cards (6 is the magic number) an error reports "Too much recursion." You can only call a handler 5 levels deep before the error occurs. So, the best way around this is to create a 'mouseUp' which controls the slide-show. I believe that someone else already posted such a similar suggestion. I just wanted to put my two cents in (after I spent 5 hours telling one guy not to depend on 'openCard' handlers. 'STAKMan'aging, Bryan K. 'STAKMan' Carter President, Apple HyperCard User Group, AHUG AppleLink: UG.AHUG All opinions/views/comments are mine!! <<>>