Debugging resizeStack handlers
Devin Asay
devin_asay at byu.edu
Mon Oct 7 15:48:27 EDT 2013
Pete,
On Oct 7, 2013, at 1:12 PM, Peter Haworth wrote:
> I wonder if anyone has any tips on debugging resizeStackhandlers. My
> experience is that any runtime error makes the IDE hang and setting a
> breakpoint also hangs things up.
> Pete
> lcSQL Software <http://www.lcsql.com>
I have taken to writing a handler that does all of the size and position adjustments then calling it from resizeStack after I've tested and debugged it.
on resizeStack pNewWdth, pNewHgt
arrangeCard pNewWdth, pNewHgt
end resizeStack
on arrangeCard pNewWdth, pNewHgt
# do size and position adjustments here
end arrangeCard
This way I can test arrangeCard from the message box and fiddle and tweak until it's working right. Only then do I place the call into the resizeStack handler.
That said, I have noticed that *sometimes* when you are hung up in the debugger inside a resizeStack handler, if you click stop and close the whole script editor (all of the tabs, not just the current tab), you can get out of the hung condition and not have to force quit.
HTH
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list