[comp.sys.mac.hypercard] Current Card of Another Stack?

mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) (03/05/91)

Excuse me if this is in the manual, but I can't find it. I have two open stacks
(need I mention this is HC 2.0?). I am on stack A. I want to go to stack B (to
get something) and back to stack A without changing the current card of stack
B. Now if I could say

    go to current card of stack B

I would be OK. Of course, saying

    go to stack B

just goes to the first card of the stack. I would prefer not to have to modify
the stack to have it keep track of the current card. Any ideas?

Jeff E Mandel MD MS
Asst Professor of Anesthesiology
Tulane University School of Medicine
New Orleans, LA

hughson@turtle.cis.ohio-state.edu (Jerry R Hughson) (03/05/91)

In article <6448@rex.cs.tulane.edu> mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) writes:
...
>(need I mention this is HC 2.0?). I am on stack A. I want to go to stack B (to
>get something) and back to stack A without changing the current card of stack
>B. Now if I could say
>
>    go to current card of stack B
>
>I would be OK. Of course, saying
>
>    go to stack B
>
>just goes to the first card of the stack. I would prefer not to have to modify
>the stack to have it keep track of the current card. Any ideas?
>
>Jeff E Mandel MD MS
>Asst Professor of Anesthesiology
>Tulane University School of Medicine
>New Orleans, LA

One idea would be to store the Id's of the cards in HyperTalk globals.
...
global stackAID, stackBID
...
put the id of this card into stackAID
go to card stackBID of stack b
...

Another way might be the use of push and pop card, but I think that could
get messy.

hope this helps :-)

J.R. Hughson
hughson@cis.ohio-state.edu
jhughson@magnus.acs.ohio-state.ed

niski@reed.bitnet (Joe Niski,(ext.525)) (03/06/91)

>>I am on stack A. I want to go to stack B (to get something) and back to 
>>stack A without changing the current card of stack B. Now if I could say
>>
>>    go to current card of stack B
>>
>>I would be OK. Of course, saying
>>
>>    go to stack B
>>
>>just goes to the first card of the stack. I would prefer not to have to modify
>>the stack to have it keep track of the current card. Any ideas?
>>
>One idea would be to store the Id's of the cards in HyperTalk globals.
>...
>Another way might be the use of push and pop card, but I think that could
>get messy.

I dunno, using push & pop doesn't seem any messier:
script in stack B:

	on suspendStack
	   push card
	end suspendStack

from stack A, "pop card" will take you back to stack B, leaving A open on 
the screen.  To me, it seems a bit more elegant than declaring global variables 
that don't get used much.  Just an opinion...

-------------------------------------------------------------------------------
Joe Niski						niski@reed.edu
Mac Support Coordinator					niski@reed.bitnet
Reed College, Portland, OR 97202			503-777-7525

Henry.Halff@f421.n109.z1.fidonet.org (Henry Halff) (03/06/91)

>>... I am on stack A. I want to go to stack B
>(to
>>get something) and back to stack A without changing the current card
>of
>stack
>>B.
 
>Another way might be the use of push and pop card, but I think that
>could
>get messy.
 
Push and pop is a better and easier way. To wit:
 
push this card
go to stack b
do whatever
pop card


--  

        Henry Halff, Henry.Halff@f421.n109.z1.fidonet.org
      via The Black Cat's Shack's FidoNet<->Usenet Gateway
          blkcat.fidonet.org   and   Fidonet 1:109/401

Susan.A.Tenney@dartmouth.edu (Susan A. Tenney) (03/12/91)

In article <6448@rex.cs.tulane.edu> mandel@vax.anes.tulane.edu (Jeff E Mandel
MD MS) writes:

>Excuse me if this is in the manual, but I can't find it. I have two open
stacks
>(need I mention this is HC 2.0?). I am on stack A. I want to go to stack B (to
>get something) and back to stack A without changing the current card of stack
>B. Now if I could say
>
>      go to current card of stack B

>I would be OK. Of course, saying
>
>      go to stack B
>
>just goes to the first card of the stack. I would prefer not to have to modify
>the stack to have it keep track of the current card. Any ideas?

You can say 

  show window B

where B is the short name of the stack if the longWIndowTitles property is
false, or the full pathname if longWindowTitles is true.

Susan Tenney
Dartmouth College Computing Services