Stack height won't stay locked

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

Mistfall
Posts: 23
Joined: Tue Dec 30, 2008 1:26 pm
Contact:

Stack height won't stay locked

Post by Mistfall » Sat Mar 23, 2013 2:15 am

Hello all!

I have set my mainstack height to 1024 pixels. I un-check "Resizable" and click the Lock icon, and save the file.

I close the stack, Remove it from memory.

When I re-open the stack, the height of the stack is reset to 938 pixels. "Resizable" remains unchecked, but the Size and Position lock is now unlocked.

There's two substacks also, with the exact same problem. I set them to 1024 pixels, and when I re-open my (saved) file, they always revert to 938 pixels.

I have no idea why.

Can anyone tell me why I can't get my stack height to stay where I set it? :cry:

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Stack height won't stay locked

Post by Simon » Sat Mar 23, 2013 5:38 am

Hi,
I haven't an answer for you but I did have a problem like this so I'm following this thread.
I do have a question though. Is 1024 larger than your available screen size? As in does either the top or bottom of your stack get hidden?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

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

Re: Stack height won't stay locked

Post by dunbarx » Sat Mar 23, 2013 6:20 am

I see this too. Seems crazy.

Of course, you can add an openstack handler that sets the loc and rect of your stack(s). But will somebody please say what is going on here.

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Stack height won't stay locked

Post by FourthWorld » Sat Mar 23, 2013 7:43 am

Mistfall, what is the vertical resolution of your display?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mistfall
Posts: 23
Joined: Tue Dec 30, 2008 1:26 pm
Contact:

Re: Stack height won't stay locked

Post by Mistfall » Sat Mar 23, 2013 3:19 pm

Thanks for your replies!

The vertical resolution of my display is 1050.

With the menu bars and window bars, there are some pixels being cut off from my stack, I think. Is the stack size limited to the available screen space?

I can use the brute force method like Craig suggested and have the main stack and substacks set by a handler.


I'm playing around to see if someone who had one Fortran 5 class thirty years ago can write a functioning iPad app all by her lonesome, so I'm being stubborn about the dimensions of the stacks.

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

Re: Stack height won't stay locked

Post by dunbarx » Sat Mar 23, 2013 4:43 pm

Screen size don't enter into it. Up to 65,535, anyway.

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Stack height won't stay locked

Post by FourthWorld » Sat Mar 23, 2013 6:04 pm

dunbarx wrote:Screen size don't enter into it. Up to 65,535, anyway.
Actually, it does. While you can set the size of a stack to 65535px, no monitor on earth can render it, very few systems have enough GPU ram to render it, so the LC engine won't even try.

IIRC, the engine generally creates stacks as large as specified unless the effective screenRect prohibits it, then it will only render as large as can be seen. I'll admit that I almost never use fixed-size windows, instead handling them dynamically to adapt to whatever display they're on with a resizeStack handler triggered on preOpenStack, so their may be behaviors here I'm unfamiliar with.

The difference between the size being requested (1024) and the size rendered (938) is bigger than the height of a menubar, so it would seem reasonable that we could rule out the normal menu bar cropping if you're on Mac OS. Still, to be thorough: Are you on Mac, and what is the height of your menu group?

If it's possible to post the stack it may take only a few minutes examining its properties to determine what's going on with it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mistfall
Posts: 23
Joined: Tue Dec 30, 2008 1:26 pm
Contact:

Re: Stack height won't stay locked

Post by Mistfall » Sat Mar 23, 2013 10:24 pm

The stack doesn't have a menu group; I am on a Mac, and I was thinking of the system menu bar.



Hmmm... just found out I can't attach the stack; it's a .rev file and "The extension rev is not allowed".

I wonder if the problem could have something to do with it being a .rev file.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Stack height won't stay locked

Post by Simon » Sat Mar 23, 2013 10:41 pm

Hi Mistfall,
To upload to this forum you have to zip the file first and I think it has to be smaller than 256KB.
There is also some regulation that says you have to have a number of previous post but I don't know that number.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Stack height won't stay locked

Post by FourthWorld » Sat Mar 23, 2013 10:43 pm

Interesting that your version of LC is using the .rev extension. Which version are you using?

And can you attach it here if you change its extension to .livecode?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Stack height won't stay locked

Post by sturgis » Sat Mar 23, 2013 11:44 pm

Zip it up and you can attach it then.

Mistfall
Posts: 23
Joined: Tue Dec 30, 2008 1:26 pm
Contact:

Re: Stack height won't stay locked

Post by Mistfall » Sun Mar 24, 2013 4:37 am

Making a copy with deleted substacks and images worked!

Thank you all again for your help.

Attached is the mainstack.
Apothecary Home.livecode.zip
(1.75 KiB) Downloaded 328 times

Mistfall
Posts: 23
Joined: Tue Dec 30, 2008 1:26 pm
Contact:

Re: Stack height won't stay locked

Post by Mistfall » Sun Mar 24, 2013 6:19 pm

Sorry I missed your question, Richard. The project was originally started in Rev Media 4.0, so it had the .rev extension.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Stack height won't stay locked

Post by jacque » Sun Mar 24, 2013 7:52 pm

I think what you're seeing is LiveCode limiting the stack size to the available working area. This is controlled by the global windowBoundingRect property. When LiveCode starts up, it sets the windowBoundingRect to the empty area that excludes its own toolbar, tool palette, and a few other things.

You can fix it by resetting the windowBoundingRect to a larger rectangle at any time. Or if you just want a quick fix, use the View menu to remove both the toolbar icons and text, which will give you a few more pixels of vertical space.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mistfall
Posts: 23
Joined: Tue Dec 30, 2008 1:26 pm
Contact:

Re: Stack height won't stay locked

Post by Mistfall » Sun Mar 24, 2013 8:56 pm

Thank you, Jacque! That must be what's happening. Now it makes sense! :D

Post Reply