【问题标题】:Enable "not thread-safe" warning for Swing Controls in MATLAB在 MATLAB 中为 Swing 控件启用“非线程安全”警告
【发布时间】:2011-06-09 07:59:49
【问题描述】:

默认情况下,Swing “非线程安全”警告在 MATLAB 中被禁用。有谁知道这个警告的 identifier 是什么,以便我可以在 MATLAB 中启用它?

Yair Altman 几年前发布过它,但我再也找不到它了。另见http://www.mathworks.ch/matlabcentral/newsreader/view_thread/129919

这个链接是关于线程安全和为什么重要http://undocumentedmatlab.com/blog/matlab-and-the-event-dispatch-thread-edt/

【问题讨论】:

  • 为什么要启用它们?

标签: java swing matlab user-interface event-dispatch-thread


【解决方案1】:

尝试以下一项或多项:

com.mathworks.mde.desk.MLDesktop.getInstance.enableThreadSafeGetMethods()
com.mathworks.mwswing.MJUtilities.setThreadingChecksEnabled(true)
com.mathworks.mwswing.MJUtilities.setThreadSafetyWarningStackTraceSuppressed(false)

亚尔

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-08-21
    • 2011-02-15
    • 1970-01-01
    • 2014-03-31
    • 1970-01-01
    • 1970-01-01
    • 2011-03-30
    相关资源
    最近更新 更多