setting width of card

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

Post Reply
jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

setting width of card

Post by jalz » Mon Jun 02, 2014 12:10 pm

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

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: setting width of card

Post by Klaus » Mon Jun 02, 2014 1:03 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: setting width of card

Post by FourthWorld » Mon Jun 02, 2014 2:45 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: setting width of card

Post by dunbarx » Mon Jun 02, 2014 3:17 pm

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

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: setting width of card

Post by jalz » Mon Jun 02, 2014 4:10 pm

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

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: setting width of card

Post by Klaus » Mon Jun 02, 2014 4:42 pm

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

makeshyft
Posts: 220
Joined: Mon Apr 15, 2013 4:41 am
Contact:

Re: setting width of card

Post by makeshyft » Sat Apr 30, 2016 3:19 am

This thread is very helpful....thanks.... found it by fluke! exactly what I was looking for.

Thanks guys
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”