Page 1 of 2

Stack height won't stay locked

Posted: Sat Mar 23, 2013 2:15 am
by Mistfall
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:

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 5:38 am
by Simon
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

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 6:20 am
by dunbarx
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

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 7:43 am
by FourthWorld
Mistfall, what is the vertical resolution of your display?

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 3:19 pm
by Mistfall
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.

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 4:43 pm
by dunbarx
Screen size don't enter into it. Up to 65,535, anyway.

Craig Newman

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 6:04 pm
by FourthWorld
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.

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 10:24 pm
by Mistfall
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.

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 10:41 pm
by Simon
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

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 10:43 pm
by FourthWorld
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?

Re: Stack height won't stay locked

Posted: Sat Mar 23, 2013 11:44 pm
by sturgis
Zip it up and you can attach it then.

Re: Stack height won't stay locked

Posted: Sun Mar 24, 2013 4:37 am
by Mistfall
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 337 times

Re: Stack height won't stay locked

Posted: Sun Mar 24, 2013 6:19 pm
by Mistfall
Sorry I missed your question, Richard. The project was originally started in Rev Media 4.0, so it had the .rev extension.

Re: Stack height won't stay locked

Posted: Sun Mar 24, 2013 7:52 pm
by jacque
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.

Re: Stack height won't stay locked

Posted: Sun Mar 24, 2013 8:56 pm
by Mistfall
Thank you, Jacque! That must be what's happening. Now it makes sense! :D