How can I tell if I'm on the first card (of this bg or of this stack)?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 73
- Joined: Sun Jun 17, 2007 12:08 am
- Location: Montréal, Canada
How can I tell if I'm on the first card (of this bg or of this stack)?
Hi all.
Such simple questions...
Thanks!
Such simple questions...
Thanks!
Michel
Montréal, Canada
Montréal, Canada
Re: How can I tell if I'm on the first card (of this bg or of this stack)?
Bonjour Michel,
et voila:
...
put the number of this cd
...
Best
Klaus
et voila:
...
put the number of this cd
...
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 73
- Joined: Sun Jun 17, 2007 12:08 am
- Location: Montréal, Canada
Re: How can I tell if I'm on the first card (of this bg or of this stack)?
Hallo Klaus.
Not really... what I want to be able to do is something like:
if this card is the first card of this stack then...
I've been trying all kinds of combinations in the msg box, but none of them works (errors like "chunk source is not a container, etc.)
Regards.
Not really... what I want to be able to do is something like:
if this card is the first card of this stack then...
I've been trying all kinds of combinations in the msg box, but none of them works (errors like "chunk source is not a container, etc.)
Regards.
Michel
Montréal, Canada
Montréal, Canada
Re: How can I tell if I'm on the first card (of this bg or of this stack)?
Bonjour Michel,
LC is all about PROPERTIES and to get and set them and cards have a NUMBER property, so:
Best
Klaus
LC is all about PROPERTIES and to get and set them and cards have a NUMBER property, so:
Code: Select all
...
if the num of this cd = 1 then
## current card is the FIRST card in your stack, do your thing...
end if
...
Klaus
-
- Livecode Opensource Backer
- Posts: 73
- Joined: Sun Jun 17, 2007 12:08 am
- Location: Montréal, Canada
Re: How can I tell if I'm on the first card (of this bg or of this stack)?
Ah... the properties!
Thank you for pointing me in that direction!
And I see that I won't have to ask my followup question: how can I tell if I'm on the LAST card:
the number of the last cd of this stack
Danke, danke!
Thank you for pointing me in that direction!
And I see that I won't have to ask my followup question: how can I tell if I'm on the LAST card:
the number of the last cd of this stack
Danke, danke!
Michel
Montréal, Canada
Montréal, Canada
Re: How can I tell if I'm on the first card (of this bg or of this stack)?
Many ways to skin a cat in Livecode:
...
if the num of this cd = the num of cds then
...
Avec plaisir, mon ami!
...
if the num of this cd = the num of cds then
...
Avec plaisir, mon ami!