【问题标题】:What is this message when scrolling the mouse while the debugger is stopped?在调试器停止时滚动鼠标时出现此消息是什么?
【发布时间】: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


    【解决方案1】:

    我没有真正的解决方案,但有一个解决方法。

    如 cmets 中所述,只需在 WheelMouseEvent 处理程序中添加一个带有整数的 put,问题就消失了。

    put nVal 
    

    如果有人找到另一种解决方案,比填充消息窗口更离散,我很感兴趣。

    【讨论】:

      猜你喜欢
      • 2021-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-09
      • 1970-01-01
      • 2017-02-20
      • 2017-09-18
      • 2019-03-03
      相关资源
      最近更新 更多