Page 1 of 1
resizeStack and resizeControl
Posted: Sat Feb 28, 2015 3:32 pm
by FredBeck
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.
Re: resizeStack and resizeControl
Posted: Sat Feb 28, 2015 4:38 pm
by dunbarx
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
Re: resizeStack and resizeControl
Posted: Sat Feb 28, 2015 4:51 pm
by FredBeck
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 :)
Re: resizeStack and resizeControl
Posted: Sat Feb 28, 2015 7:10 pm
by dunbarx
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
Re: resizeStack and resizeControl
Posted: Sat Feb 28, 2015 8:48 pm
by jacque
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.
Re: resizeStack and resizeControl
Posted: Sat Feb 28, 2015 8:52 pm
by magice
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.
Re: resizeStack and resizeControl
Posted: Sat Feb 28, 2015 11:30 pm
by FredBeck
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.
Re: resizeStack and resizeControl
Posted: Sun Mar 01, 2015 12:09 am
by magice
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.
Re: resizeStack and resizeControl
Posted: Sun Mar 01, 2015 12:40 am
by FredBeck
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!