Where did my stack go?!

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

SparkOut
Posts: 2946
Joined: Sun Sep 23, 2007 4:58 pm

Re: Where did my stack go?!

Post by SparkOut » Sat Aug 15, 2020 9:21 pm

bd525 wrote:
Sat Aug 15, 2020 8:26 pm
I tried that, SparkOut, and nothing. Changed the stack height a bit, but the card height stayed at 2450. Am I misunderstanding?
Possibly, since this is just "how it is".
Try this stack to see.
Stack Size sampler.zip
(873 Bytes) Downloaded 221 times
If you look at the script you will see the only "setting" is done on the stack, but answering the stack and the card width or height show they are the same.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Where did my stack go?!

Post by richmond62 » Sun Aug 16, 2020 8:00 am

Well, here's "a sophisticated demonstration" of what I meant . . .

Code: Select all

on preOpenCard
   set the width of stack "Re-Size" to 400
   set the height of stack "Re-Size" to 400
   set the loc of stack "Re-Size" to the screenloc
   set the topLeft of grc "TL" to the topLeft of this card 
   set the topRight of grc "TR" to the topRight of this card 
   set the bottomLeft of grc "BL" to the bottomLeft of this card
   set the bottomRight of grc "BR" to the bottomRight of this card 
end preOpenCard
-
Screenshot 2020-08-16 at 10.18.48.png
Screenshot 2020-08-16 at 10.21.00.png
Attachments
Re-Size.livecode.zip
Here's the stack
(1.22 KiB) Downloaded 231 times

bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Re: Where did my stack go?!

Post by bd525 » Sun Aug 16, 2020 1:18 pm

Thanks, richmond62, I get how all that works, but it doesn't with my stack. I put...

on preOpenCard
set the height this stack to 640
preOpenStack
answer the height of this card
end preOpenCard

...into the card script of my main card. Just in case, I also have "set the height this stack to 640" in preOpenStack of the stack script. The answer from preOpenCard still comes back 2465. Again, the stack properties window says the stack height is 640.

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

Re: Where did my stack go?!

Post by dunbarx » Sun Aug 16, 2020 1:54 pm

I have had, in the twelve years I have used LC, maybe three instances where a stack has either changed its rect or its loc so that I had to hunt for it or reform it. I have no idea how this happened, but I assume it was me.

To have to explicitly set the rect and loc of a stack all over the place to ensure that it stays put at the right size seems crazy. That this is not a common occurrence is telling. There has to be something else going on. Finding that is important to the OP, and interesting to everyone else.

Have you done an exhaustive search for the words "rect", "loc", "top", left", etc, in every script in the stack file?

Craig

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Where did my stack go?!

Post by Klaus » Sun Aug 16, 2020 1:57 pm

Please post the complete stack script and the complete script of your first card!
Or, if possible, post your stack here (ZIP it first).

bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Re: Where did my stack go?!

Post by bd525 » Sun Aug 16, 2020 7:46 pm

Thanks for the input, responders, but Klaus has looked at the stack and can't identify the problem. I expect (hope) I'll be able to manage the issue without major implications. I'll also send the stack to Livecode support, in case they can figure out what's going on.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Where did my stack go?!

Post by Klaus » Sun Aug 16, 2020 8:17 pm

Yep, that's a complete mistery, you can resize the stack manually or by script, works fine, no indication for this issue in the scripts!

But the first card, if you query the height by script or look at the inspector, insists that its height = 2465 all the time
no matter what height the stack is set to!? Sheeesh... :D

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Where did my stack go?!

Post by bogs » Sun Aug 16, 2020 10:41 pm

Wait, what ?! You stumped Klaus ????? I don't think that has ever happened before... Image Image
Image

bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Re: Where did my stack go?!

Post by bd525 » Mon Aug 17, 2020 10:30 pm

Update: Thierry Douez was super helpful in migrating elements of my stack to another stack. I had been able to get elements in my original corrupted stack to maintain position in Livecode despite the strange numbers and behaviors of the property windoid. And Mac standalones worked fine. But a Windows standalone showed nothing on the screen! No doubt elements were where I found them when I first diagnosed what was going on, way up above what was displaying of the card, out of sight! And out of access by any user. Making Thierry's version work didn’t require much time and effort to move elements around to where they had been originally. Both standalones work fine. So I owe him a debt of gratitude!

Post Reply