The case of the changing dimensions
Posted: Fri May 31, 2013 10:11 pm
Hi Folks,
I am having a very perplexing problem (for me anyway) and I am hoping someone here can point me in the right direction, as I suspect it is due to my lack of understanding and experience with LiveCode.
I have a small application that just attempts to set it's stack/window dimensions and print them to a scrolling list. So far so good, most of this works, but I am having a problem with the height. So, my code defines some variables to keep track of the width and height of the stack and initially set the width to 240 px and the height to 320 px, then if it is running on a desktop it resets the with to 400 and the height to 600. The code I am using looks like this:
-- initial setting
put 240 into theStackWidth
put 320 into theStackHeight
set the width of this stack to theStackWidth
set the height of this stack to theStackHeight
// some code here to determine the platform...
-- on a desktop we reset the width and height
put 400 into theStackWidth
put 600 into theStackHeight
set the width of this stack to theStackWidth
set the height of this stack to theStackHeight
// and if I print out or look at the value of theStackHeight container
// in the debugger it will be set to the height property in the stack's
// properties window which appears to be set to the last resized
// value, rather than the 320 used to set it initially.
This has me rather going around in circles trying to understand what is going on. I would like application not to remember any resizing values and always start with a known size.
Any help would be greatly appreciated.
Thanks,
Daryl
I am having a very perplexing problem (for me anyway) and I am hoping someone here can point me in the right direction, as I suspect it is due to my lack of understanding and experience with LiveCode.
I have a small application that just attempts to set it's stack/window dimensions and print them to a scrolling list. So far so good, most of this works, but I am having a problem with the height. So, my code defines some variables to keep track of the width and height of the stack and initially set the width to 240 px and the height to 320 px, then if it is running on a desktop it resets the with to 400 and the height to 600. The code I am using looks like this:
-- initial setting
put 240 into theStackWidth
put 320 into theStackHeight
set the width of this stack to theStackWidth
set the height of this stack to theStackHeight
// some code here to determine the platform...
-- on a desktop we reset the width and height
put 400 into theStackWidth
put 600 into theStackHeight
set the width of this stack to theStackWidth
set the height of this stack to theStackHeight
// and if I print out or look at the value of theStackHeight container
// in the debugger it will be set to the height property in the stack's
// properties window which appears to be set to the last resized
// value, rather than the 320 used to set it initially.
This has me rather going around in circles trying to understand what is going on. I would like application not to remember any resizing values and always start with a known size.
Any help would be greatly appreciated.
Thanks,
Daryl