determine the current card of another stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 256
- Joined: Sun May 27, 2007 8:19 pm
determine the current card of another stack
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
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
Hi Martin,
try
will put the name of the current card of your substack into the message box
Kind regards
Bernd
try
Code: Select all
put the name of the current card of stack "mySubStack"
Kind regards
Bernd
Re: determine the current card of another stack
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
Best
Klaus
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

Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 256
- Joined: Sun May 27, 2007 8:19 pm
Re: determine the current card of another stack
Thanks Bernd and Klaus.
Setting the defaultStack is something I did not realize you could do. Interesting.
Martin
Setting the defaultStack is something I did not realize you could do. Interesting.
Martin
Re: determine the current card of another stack
Try currentCard (one word. )
Code: Select all
get the currentCard of stack "other stack"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 256
- Joined: Sun May 27, 2007 8:19 pm
Re: determine the current card of another stack
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
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
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: determine the current card of another stack
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.jacque wrote:Try currentCard (one word. )]
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn