push and pop -- access to the 'last' card?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
leston12
Posts: 25
Joined: Thu Mar 28, 2013 8:25 pm

push and pop -- access to the 'last' card?

Post by leston12 » Wed Apr 17, 2013 4:41 am

I have a couple of cards that each navigate to the same (third) card.

In the scripts that go to that card, I use 'push card' to store where I came from. Then I use 'pop card' to go back.

I want slightly different behavior based on which card I am coming from. The most obvious and simplest way would seem to utilize the list that 'push' and 'pop' use and just check the card on the top of the list. I can't find anything in the documentation to indicate this is possible. Is that list available ... Anyone know?

I know that I could set a custom prop somewhere but if this information is already stored by the system (which it is) and is accessible (that's my question), why duplicate it?

Thanks in advance.
Leston

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: push and pop -- access to the 'last' card?

Post by Dixie » Wed Apr 17, 2013 5:12 am

Leston...

'Push' & 'pop' will do what yow wish... but wanting to get the name of the card, have a look at 'recentcards' in the dictionary...

Dixie

leston12
Posts: 25
Joined: Thu Mar 28, 2013 8:25 pm

Re: push and pop -- access to the 'last' card?

Post by leston12 » Wed Apr 17, 2013 5:27 am

That's what I was looking for. Thanks Dixie!

BTW ... Seems curious that the recentCards property is not in the 'See Also' section of the Push and Pop entries in the Dictionary.
Leston

Post Reply