Page 1 of 1

determine the current card of another stack

Posted: Fri Aug 07, 2015 9:00 pm
by Martin Koob
Is there a way to determine the current card of another stack?

current card returns the name of the current card of the current stack.

If you have two stacks open, the main stack and a substack can you determine from the main stack what the current card of the substack is?

I know this does not work

the current card of stack "my substack"

Martin

Re: determine the current card of another stack

Posted: Fri Aug 07, 2015 10:35 pm
by bn
Hi Martin,

try

Code: Select all

put the name of the current card of  stack "mySubStack"
will put the name of the current card of your substack into the message box

Kind regards

Bernd

Re: determine the current card of another stack

Posted: Sat Aug 08, 2015 12:15 pm
by Klaus
Hi Martin,

you can also set "the defaultstack" (maybe not so helpful in this example, but anyway):
...
set the defaultstack to "name of other stack, which is currently not the topstack"
put the name of THIS cd into tCardName
set the defaultstack to "THIS STACK"
## now continue to work on in THIS stack...
...
You get the picture :D


Best

Klaus

Re: determine the current card of another stack

Posted: Sat Aug 08, 2015 3:37 pm
by Martin Koob
Thanks Bernd and Klaus.

Setting the defaultStack is something I did not realize you could do. Interesting.

Martin

Re: determine the current card of another stack

Posted: Sun Aug 09, 2015 4:44 pm
by jacque
Try currentCard (one word. )

Code: Select all

get the currentCard of stack "other stack" 

Re: determine the current card of another stack

Posted: Sun Aug 09, 2015 5:03 pm
by Martin Koob
Thanks Jacque.

That works too.

Oddly, I couldn't find currentCard in the dictionary. Then I found someone had posted a documentation bug

http://quality.runrev.com/show_bug.cgi?id=14651

I also found that someone had problem with using currentCard in some situations.

http://www.runrev.com/pipermail/use-liv ... 11584.html


Martin

Re: determine the current card of another stack

Posted: Sun Aug 09, 2015 5:11 pm
by FourthWorld
jacque wrote:Try currentCard (one word. )]
I'm so used to camelCase portmonteaus in xTalks that I often find myself typing "the detailedFiles". There's probably a rule that would allow us to anticipate when a function is a single- or double-word expression, but it's probably a bit linguistically Chomsky for me to grasp. My simple mind just wishes it would be one way or the other.