confusion over message sent after toplevel

emlowe (starnet!apple!fsa.ca!emlowe)
Tue, 18 Apr 1995 15:34:51 -0700 (MDT)

Hi. I hope that someone can help me a little. I'm a tad confused over
what messages are sent to a stack (or card) when a toplevel "stackname"
(or go to "stack name") command is given. I would like to have the
following scenerio:

Stack's "A", "B", and "C"
stack "A" has a button that does a toplevel "B".
stack "C" has two cards "card A" and "card B".

I would like the approperiate card on stack "C" to be displayed, for
whichever of "A" or "B" has the keyboard focus. (Actually maybe not
always the keyboard focus, but for whichever is "in front".)

I thought that I could use the (pre)openStack and the resumeStack
messages to accomplish this, but I am having a bit of trouble.

Let's assume that stack "A" is open, but stack "B" is not. Clicking on
the button in stack "A" opens stack "B", and "B" is sent the various
(pre)Open messages and given the keyboard focus. In the (pre)openStack
handler for "B" I can go to card "B" of stack "C". Everything is
cool.

I can also use the resumeStack handler in "A" and "B" to go to the
correct card in "C" whenever the user clicks in stack "A" or "B" and
therefore gives it the keyboard focus. Again everything fine. (assuming
click to type, but that's another can of worms)

My problem is the following: If stack "B" is open, and stack "A" has
the keyboard focus, clicking on the button in stack "A" does not send
any messages (that I know of) to stack "B", and does not give stack "B"
the keyboard focus. However, stack "B" is brought to the front, i.e.
raised, but, as mentioned, is not given the keyboard focus, and hence
not sent a stackResume message. Are any messages sent to stack "B" in
this case? It would appear not, as there doesn't seem to be any
message like stackRaise. I can't therefore change the card in stack "C"
to "card B".

However, the topStack property is (correctly?) set to stack "B". Should
(Can??) I use the watch command to monitor the topStack property in
stack "C" and display the correct card whenever it is changed.

I'm using MetaCard 1.4.1 on a variety of different platforms.

Thanks

-Earle

-- 
Earle Lowe
emlowe@fsa.cs
FSA Corporation
Performance and system software for UNIX networks.