Page 1 of 1

Stacks and cards

Posted: Tue Nov 12, 2013 9:49 am
by Neurox66
Hi,

I work with many stacks and cards,
how do I determine which card is it open?

Thanks,
Paolo

Re: Stacks and cards

Posted: Tue Nov 12, 2013 10:57 am
by jmburnod
Ciao paolo,
many stacks and cards
Why not a global like gMyCurrentCard with an "initCurCD" handler in each stack ?

Code: Select all

global gMyCurrentCard
on initCurCD
   put the long name of this cd into gMyCurrentCard
end initCurCD
or a function return the long name of the current cd ?

Best

Jean-Marc

Re: Stacks and cards

Posted: Tue Nov 12, 2013 4:21 pm
by dunbarx
Hi.

Or you might just place a handler in a backscript, something like:

on opencard
put the number of this card && the name of this card && the name of this stack
end opencard

This will put all that into the msg box. You can always put the information somewhere else.

Craig Newman

Re: Stacks and cards [Solved]

Posted: Wed Nov 13, 2013 6:42 pm
by Neurox66
Thanks for suggestions,
I can't use the command "current card" because I've opened four card at same time.
I've created a function that updates (add/delete) a global variable with all the cards open.

Paolo

Re: Stacks and cards

Posted: Wed Nov 13, 2013 6:50 pm
by dunbarx
Hi.

Whatever works for you.

When you say you have four cards open, what that really means is that you have four stacks open in four windows. The "topStack" is the one with focus.

Just so you know how it goes, the line of code I sent before could always be modified to say:

put the number of this card && the name of this card && the name of the topStack

Craig