[comp.sys.mac.hypercard] openCard - what's going on?

udell@Shasta.STANFORD.EDU (Jon Udell) (02/18/88)

I have modified the "Datebook" stack so that when using the "To Do"
background the arrow keys will not take you out of the background, but
will instead wrap around.  I have also written (for a differnet purpose) an
openCard routine that is intercepted by the background, then passed on.
The problem is that openCard is not being called as expected.  The code
follows:

on rightArrow
  get name of background
  visual effect wipe left
  go to next card
  if it <> name of background then go first card of background "To Do"
end rightArrow

openCard is sent to the next card in the stack by the first "go" statement,
but when the second "go" statement is executed, openCard is not called
again.  I have also written a "leftArrow" handler in the same style, but
that one causes openCard to be sent each time "go" is executed.

Does anyone have any idea what is going on here?  Any help would be
appreciated.

Jon

edmoy@violet.berkeley.edu (02/19/88)

In article <2498@Shasta.STANFORD.EDU> udell@Shasta.STANFORD.EDU (Jon Udell) writes:
>The problem is that openCard is not being called as expected.  The code
>follows:
>
>on rightArrow
>  get name of background
>  visual effect wipe left
>  go to next card
>  if it <> name of background then go first card of background "To Do"
>end rightArrow
>
>openCard is sent to the next card in the stack by the first "go" statement,
>but when the second "go" statement is executed, openCard is not called
>again.  I have also written a "leftArrow" handler in the same style, but
>that one causes openCard to be sent each time "go" is executed.

I'm not sure why your not getting the other openCard, except that it might
be going to another background.

What I use in my stacks may work better for you, if you really don't need
to go to another background and back.  Try:

on rightArrow
  visual effect wipe left
  go to next card of this background
end rightArrow

Edward Moy
Workstation Software Support Group
University of California
Berkeley, CA  94720

edmoy@violet.Berkeley.EDU
ucbvax!violet!edmoy