if last card of stack then

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
herbwords
Posts: 70
Joined: Sat Dec 01, 2007 2:59 am

if last card of stack then

Post by herbwords » Thu Apr 11, 2013 8:24 pm

this script is in a button on all cards that ascends to the last card of stack "inventory". I'm trying to get to card "inventory1" in another stack if the current card is the last card of the "inventory" stack.

on mouseUp
if this cd is last cd of stack "inventory" then
go to cd "inventory1" of stack "invControl"
else
go next
end if
end mouseUp

any suggestions appreciated,

Patrick

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: if last card of stack then

Post by dunbarx » Thu Apr 11, 2013 8:43 pm

Hi.

I would have written this as:

if the number of this cd = the number of cds

And do you need to put this in a button? Why not in the stack script, in an openCard handler? Although maybe you want to navigate manually.

Craig Newman

Post Reply