changing first to open, card....SOLVED

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

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

changing first to open, card....SOLVED

Post by liveme »

Hi warriors !

Added an extra new card to stack ...now looking for how to make it as the opening card when stack is loaded :
could not find where does one change the setting for that ?
any clue...
Tks
Last edited by liveme on Fri Apr 09, 2021 10:34 am, edited 1 time in total.
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: changing first to open, card....

Post by dunbarx »

Hi.

Easy. Just set the number of your card of interest to "1".

Craig
liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: changing first to open, card....

Post by liveme »

Hi, I can see an Id 6 digit number but can't reach it, could you show here how you edit that number ?
:(
kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm

Re: changing first to open, card....

Post by kdjanz »

Code: Select all

 set the number of card to number
Allows you to change the number property of the card, bumping all the other cards up or down appropriately.

A better way might be to name all your cards, and then in the openStack handler “go to card “openingCard”. Then the order of the cards will never matter or get messed up.

Kelly
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: changing first to open, card....

Post by bogs »

Keep in mind as far as card ordering goes, you can also just drag the desired card to the order you want it in the project browser.

Image

The above shows cards that were made in order, then dragged to re-order them. This also works for controls on a card, etc.
Image
liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: changing first to open, card....SOLVED

Post by liveme »

Thanks people; worked out fine !
8)
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: changing first to open, card....SOLVED

Post by jmburnod »

Hi,
I can see an Id 6 digit number but can't reach it, could you show here how you edit that number ?
Yes, we can change the id of a control but it is recommanded to read informations about it in LC dictionary.
I never needed to change id but i know it can be useful.
Best regards
Jean-Marc

Best regards
Jean-Marc
https://alternatic.ch
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: changing first to open, card....SOLVED

Post by dunbarx »

When I said set the number of your card, I really meant the number, not the ID.

You have a card ID of six digits??? Never seen anything but four.

What are they?

Craig
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: changing first to open, card....SOLVED

Post by jmburnod »

Hi Craig,
I guess that is a control id
Jean-Marc
https://alternatic.ch
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: changing first to open, card....SOLVED

Post by dunbarx »

Jean-Marc.

Not that any of this matters, but control ID's are also four digits, unless you include the string "ID" itself.

No?

Craig
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: changing first to open, card....SOLVED

Post by jmburnod »

Craig,
No. I'am able to get an id with 5 digits I guess depends the num of control of the stack

Jean-Marc
https://alternatic.ch
andresdt
Posts: 156
Joined: Fri Aug 16, 2019 7:51 pm
Contact:

Re: changing first to open, card....SOLVED

Post by andresdt »

jmburnod wrote: Fri Apr 09, 2021 6:30 pm Craig,
No. I'am able to get an id with 5 digits I guess depends the num of control of the stack

Jean-Marc
create a button then set the id of that button to 10000 from aui onwards all the objects you create will have an id greater than 10000.

Code: Select all

create button "Test1"
set the id of button "Test1" to 10000
Be kind, we all have our own wars.
https://torocruzand.com/
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: changing first to open, card....SOLVED

Post by dunbarx »

Aha.

Certainly true that you can set an ID, and then LC will increment from there. I wonder if the OP actually did that, though, since he was only interested in moving a card in his stack to the front.

Anyway, as I said, it hardly matters.

Craig
liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: changing first to open, card....SOLVED

Post by liveme »

correct :
- stack has 6 digit ID
- cards have 5 digits ID
- I dont mess with IDs so have no idea if they should be 1 or a zillion digit long...

BTW, I still dont know where is that "famous card number" (window setting) one can change....noone explained this so far !
I just moved the card UP, and that's it.

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

Re: changing first to open, card....SOLVED

Post by dunbarx »

Hi.

All controls have a number property, which is why we should never set the name of a control to a number. "F3" or "3F" are OK. though.

Cards also have the number property. Same caveat, but you just:

Code: Select all

set the number of card 'yourCardHere" to '1"
How did you do it without this? You can cut and paste cards cleverly, but that is not the best way at all.

Craig
Post Reply