2011-06-09 24 views
2

默认情况下Swing “非线程安全”警告在MATLAB中禁用。有谁知道这个警告的标识符是什么,这样我可以在MATLAB中启用它?在MATLAB中为Swing控件启用“非线程安全”警告

Yair Altman在几年前发布了它,但我无法再找到它。又见http://www.mathworks.ch/matlabcentral/newsreader/view_thread/129919

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

+0

你为什么要启用它们? – jtahlborn 2011-06-10 11:33:52

回答

3

请尝试以下的一种或多种:

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

亚伊尔