【发布时间】:2012-06-15 01:56:13
【问题描述】:
问题
使用 Director 11.5 和 Windows 7 以及 MouseWheel Xtra (wheelmouse.zip),当我在调试器停止时滚动鼠标时,消息窗口中会显示以下消息:
lcr_stk_PopFrame: unbalanced stk lcr_stk_PopFrame: unbalanced stk prev=1560 top=1568
然后,通常不再可能继续单步执行代码或检查变量、打开列表等。有时 Director 会崩溃。
如果我在调试器中停止时不滚动,则没有问题。但是调试的时候真的很难不滚动……
如何重现
- 创建新的导演电影
- 在舞台上放点东西
- 将以下代码粘贴到电影脚本中
- 在 on mouseDown 处理程序中放置一个断点
- 点击舞台
- 滚动鼠标滚轮
- 尝试在处理程序中一步一步,在变量检查器中打开列表
行话代码:
on startmovie
put "sartWheelMouse"
startWheelMouse()
end
on stopMovie
put "closeWheelMouse"
closeWheelMouse()
end
on WheelMouseEvent (nVal)
-- This is a workaround. Putting the param or an integer allows further operation.
-- Without it, putting a string or even assigning a string to a var will
-- produce problem if user scrolls while stopped in debugger
--put nVal
-- this one doesn't harm
aa = 45
-- problem if the workaround is not present
aa = "SAGFD"
-- problem if the workaround is not present
aa = string(34)
-- problem if the workaround is not present
put "wheelMouseEvnt enter"
end
on mouseDown me
put "mousedown"
-- Put a breakpoint here. THen step by step and open the list in the variable inspector
-- Without the workaround in WheelMouseEvent, if you scroll while the debugger is stopped,
-- the debugger doesent work anymore, the list cannot be inspected and sometimes, Director crashes.
a = 32
b = "a234"
lst = ["asdfk asldjasdflkj", "asdfk asldjasdflkj", "asdfk asldjasdflkj"]
a = 32
b = "a234"
end
【问题讨论】:
标签: lingo adobe-director