Path: utzoo!attcan!uunet!mcvax!hp4nl!uva!borton From: borton@uva.UUCP (Chris Borton) Newsgroups: comp.sys.mac.hypercard Subject: Re: Calling HyperCard recursively? Message-ID: <531@uva.UUCP> Date: 14 Sep 88 13:21:42 GMT References: <8730@cup.portal.com> <16643@apple.Apple.COM> <8831@cup.portal.com> Reply-To: borton@uva.UUCP (Chris Borton) Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 27 In article <8831@cup.portal.com> michael_alan_hauser@cup.portal.com writes: >A handler (let's call it Foo) in card A gets executed (called >by a button script or whatever). During its execution, Foo >does a "go card B" AND PASSES CONTROL BACK TO HYPERCARD. The >user is now interacting with card B (and Hypercard). Some user >event causes a "Finished" handler in card B to be executed and >control is returned to Foo (the handler in card A). Note that >just doing a send to Foo won't do the trick. Foo needs to >start back up where it left off. In other words, it needs to >be able to call Hypercard as a function (or by passing a >message or whatever) and then continue with what it was doing. I suspect that the true coroutine process you wish may not be possible. But, and simpler, if not so elegant, solution popped into my mind: have a State variable in your Foo handler that determines its actions. For complicated stuff this could get very kludgey, but it wouldn't be hard to initialize myState on openStack, and then act in Foo according to the setting of myState. So, you would set it to something else in the first section of Foo and when you 'returned' from handler B by sending the same call to Foo, myState would direct it to start elsewhere rather than the beginning. Anyone with a more elegant solution? -cbb -- Chris Borton borton%uva@mcvax.{nl,bitnet,uucp} Rotary Scholar, University of Amsterdam CS