ResizeStack not responding to breakpoints
Posted: Mon Apr 24, 2017 8:11 am
Hi all,
So I have a substack and I've written a resizestack handler into the CARD of that substack. But for some reason even though I've put breakpoints into the code like I always do, the code doesn't stop and open the script window so that I can check local variables etc. The resizestack code is being triggered, though, but it's just frustrating because I can't debug it like I normally do.
Subsequent handlers that I call inside of the resizestack handler ALSO are immune to breakpoints
Livecode 8.1.2
Is this normal? Besides writing more code to "put" or "answer" the variables at each step, is there something else I can do to debug my script?
EDIT: Just read another post and it sounds like ResizeStack is not working as decribed in the dictionary. So maybe all the stuff I've read on ResizeStack online is obsolete, like the solution described here to handle multiple resolutions http://forums.livecode.com/viewtopic.php?f=8&t=14859 -- does that stuff still even work?
p.s. Code below for posterity's sake. Sorry it's not well-written as I haven't worked much with resize stuff and I haven't been able to debug it yet!
So I have a substack and I've written a resizestack handler into the CARD of that substack. But for some reason even though I've put breakpoints into the code like I always do, the code doesn't stop and open the script window so that I can check local variables etc. The resizestack code is being triggered, though, but it's just frustrating because I can't debug it like I normally do.
Subsequent handlers that I call inside of the resizestack handler ALSO are immune to breakpoints

Livecode 8.1.2
Is this normal? Besides writing more code to "put" or "answer" the variables at each step, is there something else I can do to debug my script?
EDIT: Just read another post and it sounds like ResizeStack is not working as decribed in the dictionary. So maybe all the stuff I've read on ResizeStack online is obsolete, like the solution described here to handle multiple resolutions http://forums.livecode.com/viewtopic.php?f=8&t=14859 -- does that stuff still even work?
p.s. Code below for posterity's sake. Sorry it's not well-written as I haven't worked much with resize stuff and I haven't been able to debug it yet!
Code: Select all
on resizeStack --newWidth, newHeight
if the width of this stack < item 3 of the screenRect then
set the cRect of me to the screenRect --e.g. 0,0,1536,864 i.e. FULL SCREEN
else
put the rect of this stack into tRect
put (item 3 of the screenRect / 10) into item 1 of tRect --LEFT: 10% from screen left
put (item 4 of the screenRect / 10) into item 2 of tRect --TOP: 10% from screen top
put (item 3 of the screenRect / 1.5) into item 3 of tRect --RIGHT: 67% of the screen width
put 110 + (item 3 of tRect * 6 div 10) into item 4 of tRect --BOTTOM: proportional to stack height
set the cRect of me to tRect
end if
--DO NOT resize IF bottom corner is invisible,
--or if stack width < 350 or stack height < 310
if item 3 of tRect < 350 or item 4 of tRect < 310 then
exit resizeStack
end if
--pass resizeStack
send "repositionObjects" to this card
end resizeStack