[comp.sys.mac.hypercard] problem with openStack handler

ireland@ac.dal.ca (12/13/90)

I jsut discovered that when I launch a stack from the finder its openstack
handler is called twice, but only one when I open the stack from within
HC. Is theis the way its supposed to work or is something screwy?
Sorry for the typos, my editor is not letting be make corrections. Thanks

Keith Conover  ireland@ac.dal.ca

jkc@Apple.COM (John Kevin Calhoun) (12/14/90)

In article <2450@ac.dal.ca> ireland@ac.dal.ca writes:
>I just discovered that when I launch a stack from the finder its openstack
>handler is called twice, but only one when I open the stack from within
>HC. Is this the way its supposed to work or is something screwy?

This is not the way it works by itself.  When you start HyperCard 2.0,
either by opening a stack or the application itself, it sends each of
the following messages exactly once:

startUp
openStack
openBackground
openCard

If the stack you're opening contains a startUp handler that goes
to another stack and back, then your openCard handler will be
invoked twice.  You can eliminate the extra invocation by setting
lockMessages to true in your startUp handler -- be sure to set
lockMessages back to false as soon as possible.

Kevin Calhoun
HyperCard Team
Apple Computer, Inc.

science@oasys.dt.navy.mil (Mark Zimmermann) (12/15/90)

I have a weird problem that may be related to the one that started
this thread:  under HC2.0, when I launch some stacks from the Finder
by double-clicking, the system beeps at me and fails to execute the
openStack handler that I have in the stack; when I first have opened
HyperCard itself, or have been using some other stacks, and then open
the ones in question, there is no problem.

The weirdest aspect of this is that the problem occurs only on Mac IIs
at the office, not on a IIcx or a Plus at home, although I believe
they are running identical versions of HyperCard with identical Home
stacks, etc.  The problem occurs only with stacks that I have created
at home, and brought in to the office, not with stacks originally
built at the office.

Is there any way to turn on debugging or otherwise track down the
location of the problem?  It is quite frustrating to just get a beep,
and nothing more, as an error message.  Any suggestions on how to
begin to diagnose and fix such a thing?  I have looked in vain for
common themes in the failure cases, and find none (other than the
above-mentioned presence of an openStack handler, which doesn't get
executed when launching from the Finder on some Macs, not on others).
The HC2.0 application at the office and at home have the same number
of bytes and the same creation date (though different "last modified"
dates, seemingly corresponding to the date of installation on the
machines).  I'm stumped :-(....  ^z   (science@oasys.dt.navy.mil)