resizeStack and resizeControl

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
FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Contact:

resizeStack and resizeControl

Post by FredBeck » Sat Feb 28, 2015 3:32 pm

Hi!
How did I manage to break the resizeStack message?
I've been trying at this for three hours now and I can't see an inch further.Obviuosly I did something wrong that blocks resizeStack and geometry manager.
If someone could take a look at this stack...
The resizeControl calls work ok on their own, I can move the horizontal divider ok. But on resizing the stack it stops after the fist pixel.
Also the lockLoc of the group is not reset to false as it should be at the end of the resizeControl handler.
Thanks.
Attachments
Resizable2.zip
(3.71 KiB) Downloaded 255 times

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

Re: resizeStack and resizeControl

Post by dunbarx » Sat Feb 28, 2015 4:38 pm

Hi,

On v.6.7, OS 10.9, resizing the stack does not affect the operation of the divider. There is either extra space or truncated space when I resize, since you have blocked the ability to make the stack taller. But the divider action is smooth and uneventful at any stack width.

Craig Newman

FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Contact:

Re: resizeStack and resizeControl

Post by FredBeck » Sat Feb 28, 2015 4:51 pm

The divider is fine.
Did you try resizing the width of the stack? The geometry manager jams.

If the divider works, it means that the resizeControl handlers et seq are doing their job properly.
However, when the rectangle is set from either the resizeStack handler or the geometry manager, it is only set once and stays there while I'm still resizing the window.
That's not the behavior I'm used to! the resizeStack message should be continuously updating, but apparently I've broken it.
It's happening on LC 6.5, 6.6.2 and 7.01, so I guess it's all my fault :)

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

Re: resizeStack and resizeControl

Post by dunbarx » Sat Feb 28, 2015 7:10 pm

I made another stack, with your handler copied and pasted in the stack script:

Code: Select all

on resizeStack newWidth,newHeight,oldWidth,oldHeight
   put the params
   put random(999)
   pass resizeStack
end resizeStack
I get continuous random numbers when I resize from the IDE, as we all would expect. But yours only sends one message, as you said. However, if I resize in the inspector, I get continuous messages for each pixel change. This stack may need to go to QA, unless someone else can figure it out.

Craig

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

Re: resizeStack and resizeControl

Post by jacque » Sat Feb 28, 2015 8:48 pm

Look in the stack's property inspector and make sure liveResizing is turned on. This sends continuous resizeStack messages as you change the stack rectangle. It also puts a degree of stress on the handlers that respond to that message, which is sent fast and often, so you may see jerks and sputters as you drag.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: resizeStack and resizeControl

Post by magice » Sat Feb 28, 2015 8:52 pm

This is why I don't ever use the geometry. It makes me feel stupid every time I try to understand it. (kind of like women) If you disable the geometry of both the group columnBrowser and the button horizontalDivider and then put this in the stack script I think it will give you the effect you are after.

Code: Select all

on resizeStack
   set the width of grp "ColumnBrowser" to the width of this stack
   set the width of btn "HorizontalDivider" to the width of this stack
   set the left of btn "HorizontalDivider" to 0
end resizeStack

That certainly doesn't answer the question of why it's not working as is, but at least it resizes.

FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Contact:

Re: resizeStack and resizeControl

Post by FredBeck » Sat Feb 28, 2015 11:30 pm

Thanks all.
Jacque, I forgot to mention I'm on windows, so no liveResizing. It's the default behavior on windows.
magice, I tried this of course, but it's exactly the same. Does it work on your side?
Craig, at least I'm not crazy! Thanks for your help.
I hope someone will have some insight on Monday.
Fred.

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: resizeStack and resizeControl

Post by magice » Sun Mar 01, 2015 12:09 am

FredBeck wrote: magice, I tried this of course, but it's exactly the same. Does it work on your side?

Fred.
Yes this works for me.
Attachments
Resizable2.rar
(3.53 KiB) Downloaded 237 times

FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Contact:

Re: resizeStack and resizeControl

Post by FredBeck » Sun Mar 01, 2015 12:40 am

Ok... I did try it but passing the message in the end, and that's what clogged the pipe. If you don't pass it, the geometry manager doesn't work.
So I won't touch the geometry manager ever again I promise :) Thanks again!

Post Reply