maximum number of cards?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
maximum number of cards?
hi...
is there any maximum number of new cards in a livecode (stack) file?
i noticed that the cards will automatically 'divide' to 2 parts after i added more than 10 new cards... and the link (using button) doesnt work..
tq
is there any maximum number of new cards in a livecode (stack) file?
i noticed that the cards will automatically 'divide' to 2 parts after i added more than 10 new cards... and the link (using button) doesnt work..
tq
Re: maximum number of cards?
Hi snarf,
Could you please provide a screenshot? What version of LC and what platform?
Best
Klaus
there is a (theoretical) limit of up to 4 GB per stack!
Huh?
Could you please provide a screenshot? What version of LC and what platform?
Yes, forum rules, sorry, you need to have at least 10 postings before you can post links etc.
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: maximum number of cards?
Could you explain what you mean by 'divide'.i noticed that the cards will automatically 'divide' to 2 parts after i added more than 10 new cards...
I started a new stack in LC 8.1.8 and made 35 cards (Mac OS 10.7.5) and see them all listed
perfectly clearly, and not divided into anything:
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: maximum number of cards?
Hi.
Hypercard could manage many thousands of cards without issue. LC will slow down dramatically after just a couple of thousand. This was true at least through v.6.
Others will recommend that data be kept externally, and loaded, record by record, perhaps into a single card as required. In other words, LC becomes a front end for that dataSet. This is a good method, because is we are talking about large numbers of "cards", we are likely talking about a dataset that has the same structure for each record. It would be rare to have a stack of many thousands of cards where, say, the graphics were different on each. Or whatever.
Craig Newman
Hypercard could manage many thousands of cards without issue. LC will slow down dramatically after just a couple of thousand. This was true at least through v.6.
Others will recommend that data be kept externally, and loaded, record by record, perhaps into a single card as required. In other words, LC becomes a front end for that dataSet. This is a good method, because is we are talking about large numbers of "cards", we are likely talking about a dataset that has the same structure for each record. It would be rare to have a stack of many thousands of cards where, say, the graphics were different on each. Or whatever.
Craig Newman
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: maximum number of cards?
Another way to deal with things that i have used several times is to have a card
with a large number of fields storing data off-screen (let us call them for the moment, "df1", "df2", "df3" . . .)
and one field (lets us call it "fDISPLAY") for data display on the part of the card that will be visible to the end-user.
Then one can use this sort of code:
In 2002 I used LiveCode (at that time called 'Runtime Revolution') to author a project with 50 substacks, each
with anywhere between 5 and 10 cards. This had to be made that way as, on my first attempt, authoring the thing as a single stack with 500 cards everything was unbelievably clunky as a stack, and my computer ground to a halt trying to make a standalone.
with a large number of fields storing data off-screen (let us call them for the moment, "df1", "df2", "df3" . . .)
and one field (lets us call it "fDISPLAY") for data display on the part of the card that will be visible to the end-user.
Then one can use this sort of code:
Code: Select all
put fld "df1" into fld "fDISPLAY"
with anywhere between 5 and 10 cards. This had to be made that way as, on my first attempt, authoring the thing as a single stack with 500 cards everything was unbelievably clunky as a stack, and my computer ground to a halt trying to make a standalone.
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: maximum number of cards?
Another way is to have all your data stored in a custom property of the card (could be in an array). Then you simply load the appropriate header:
Say you have:
fruit,apple,pear,nutcase
shoe,sandal,sneaker,horse
flake,corn,snow,nutcase
All stored in a custom property "massiveData". Then you can:
Of course you can change the above into a loop.
Craig
Say you have:
fruit,apple,pear,nutcase
shoe,sandal,sneaker,horse
flake,corn,snow,nutcase
All stored in a custom property "massiveData". Then you can:
Code: Select all
on mouseUp
put line lineOffset("car",the massiveData of me) of the massiveData of me into tLine
put item 1 of tLine into fid "Category"
put item 2 of tLine into fld "firstInstance"
put item 3 of tLine into fld "secondInstance"
...
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: maximum number of cards?
As Klaus noted, the logical limit is very large. But since LC stacks are kept in memory in their entirety you'll hit practical limits long before that.
And long before you exhaust RAM, the internal housekeeping needed to store card records on disk will become noticeably slower on save operations.
If one absolutely must store data in UI objects, I've found roughly 5000 cards to be a good practical limit for reasonably efficient use, and beyond 10,000 becomes too cumbersome.
But the key there is: do you really need to store the data in the UI? So many things in both development and runtime become much easier when we separate UI from data.
I'm sorry, I don't understand what that means. Can you provide more detail?i noticed that the cards will automatically 'divide' to 2 parts after i added more than 10 new cards... and the link (using button) doesnt work..
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: maximum number of cards?
Pretty much the question everyone would love the answer tooFourthWorld wrote: ↑Sun May 06, 2018 8:35 pmI'm sorry, I don't understand what that means. Can you provide more detail?i noticed that the cards will automatically 'divide' to 2 parts after i added more than 10 new cards... and the link (using button) doesnt work..
Re: maximum number of cards?
Hi snarf,
it would be good style if you revisit your threads from time to time and check the answers!
This is a generally quick and busy forum, so one whole month is definitively to long to wait.
Best
Klaus
it would be good style if you revisit your threads from time to time and check the answers!
This is a generally quick and busy forum, so one whole month is definitively to long to wait.
Best
Klaus