Page 1 of 1

setting width of card

Posted: Mon Jun 02, 2014 12:10 pm
by jalz
Hi all,

I'm working on a couple of print layout for my application and I have a couple of questions hopefully someone can answer.

1) What is the maximum number of cards you can have in a stack? At present, what my app does is create a new card per print layout depending on the height of the default printer, and then delete those cards when the user has finished using them. This seems to work quite nicely. The only hesitation I have is, will the system reject creating any new cards, once the card numbers go above a certain card number?

2) I generate the print cards on the fly as I need them, however when I go to view them in the application, they are excessively wide. They are infact wider then the the cards on my main stack. Is their a way I can control the width for the cards on my "print" stack?

Many thanks as always.
Jalz

Re: setting width of card

Posted: Mon Jun 02, 2014 1:03 pm
by Klaus
Hi Jalz,

1. menu "Help" -> "User Guide" (opens PDF), chapter 2.2.9 LiveCode Memory Limits.

2. Don't get this!?
If you create these cards, why not directly set their correct/desired dimensions? 8)


Best

Klaus

Re: setting width of card

Posted: Mon Jun 02, 2014 2:45 pm
by FourthWorld
1. If I understand this correctly, you're not asking about the number of cards in the stack at any given time, but merely the number of objects that can be created within a stack throughout its lifetime, yes? That's about 4 billion, limited by the ID range, which is a 4-byte integer and is incremented for each new object. I think you'll be fine.

2. One approach is to make a separate stack just for printing, which the user never sees directly but allows you to set it up in a way that's optimized for print output, copying whatever you need to print into it.

Re: setting width of card

Posted: Mon Jun 02, 2014 3:17 pm
by dunbarx
Hi.

What Klaus said.

Note that LC will experience a slowdown in card navigation if your stack contains more than a handful of thousands of cards. (This is not Hypercard, after all)

Craig Newman

Re: setting width of card

Posted: Mon Jun 02, 2014 4:10 pm
by jalz
Hi all,

Thanks for replying. The print cards always get deleted, so at most I'll probably have about 80-100 cards in my application. I have a substack called print, which gets reinitialised (i.e. all cards deleted and then recreated when the user clicks on print). If the number of objects that I can create are limited to the id range, think I should be OK....

Regarding the width of the new cards, from the posts I've been reading, I would have thought thy would inherit the same width as the other cards in the mainstack. These new ones seem atleast twice the width of my other cards and twice the height too. I wasn't aware you could resize cards without having to resize the stack. I'll read up some more and see if I can figure out how to set the dimension of these print cards when I create them.

Best
Jalz

Re: setting width of card

Posted: Mon Jun 02, 2014 4:42 pm
by Klaus
Hi Jalz,
jalz wrote:I wasn't aware you could resize cards without having to resize the stack.
you CAN'T! 8)

stack size = card size
Setting a cards width/height will affect ALL cards in a stack, ALWAYS!

Best

Klaus

Re: setting width of card

Posted: Sat Apr 30, 2016 3:19 am
by makeshyft
This thread is very helpful....thanks.... found it by fluke! exactly what I was looking for.

Thanks guys