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
Location: down under

changing first to open, card....SOLVED

Post by liveme » Thu Apr 08, 2021 10:46 pm

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: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Fri Apr 09, 2021 3:40 am

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
Location: down under

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

Post by liveme » Fri Apr 09, 2021 7:33 am

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
Location: Fort Saskatchewan, AB Canada

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

Post by kdjanz » Fri Apr 09, 2021 7:49 am

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: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Fri Apr 09, 2021 9:16 am

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
Location: down under

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

Post by liveme » Fri Apr 09, 2021 10:34 am

Thanks people; worked out fine !
8)

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » Fri Apr 09, 2021 10:49 am

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: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Fri Apr 09, 2021 1:54 pm

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: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » Fri Apr 09, 2021 2:18 pm

Hi Craig,
I guess that is a control id
Jean-Marc
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Fri Apr 09, 2021 3:43 pm

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: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

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

Post by jmburnod » 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
https://alternatic.ch

andresdt
Posts: 146
Joined: Fri Aug 16, 2019 7:51 pm

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

Post by andresdt » Fri Apr 09, 2021 6:56 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Fri Apr 09, 2021 7:19 pm

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
Location: down under

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

Post by liveme » Fri Apr 09, 2021 7:57 pm

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: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Fri Apr 09, 2021 8:10 pm

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

Return to “Getting Started with LiveCode - Complete Beginners”