Uitable Error with GUI

조회 수: 5 (최근 30일)
Daniel
Daniel 2011년 7월 12일
Matlab-Version: 7.12(64 bit) Java-Version: Java 1.6.0_17-b04
When I run a uitable out of a graphical user interface the following error message occurs:
com.mathworks.jmi.MatlabException: No constructor 'com.mathworks.mlwidgets.array.ValueMetaInfo' with matching signature found. at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method) at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:210) at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121) at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1550) at com.mathworks.hg.peer.ui.table. DefaultUIStyleTableModel$UITableValueTableModel$1.runOnMatlabThread(DefaultUIStyleTableModel.java:461) at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79) at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:248) at com.mathworks.hg.peer.ui.table.DefaultUIStyleTableModel$UITableValueTableModel. makeCallToMatlab(DefaultUIStyleTableModel.java:473) at com.mathworks.mlwidgets.array.ValueTableModel.requestValueFromMatlab(ValueTableModel.java:277) at com.mathworks.mlwidgets.array.ValueTableModel.updateTableData(ValueTableModel.java:260) at com.mathworks.mlwidgets.array.ValueTableModel.updateData(ValueTableModel.java:237) at com.mathworks.hg.peer.ui.table.DefaultUIStyleTableModel.updateData(DefaultUIStyleTableModel.java:368) at com.mathworks.hg.peer.ui.UITablePeer.doDataChanged(UITablePeer.java:616) at com.mathworks.hg.peer.ui.UITablePeer.doPreInitializePeerProperty(UITablePeer.java:951) at com.mathworks.hg.peer.ui.UITablePeer.initializePeerProperty(UITablePeer.java:332) com.mathworks.jmi.MatlabException: No constructor 'com.mathworks.mlwidgets.array.ValueMetaInfo' with matching signature found. at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method) at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:210) at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121) at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1550) at com.mathworks.hg.peer.ui.table.DefaultUIStyleTableModel$UITableValueTableModel$1. runOnMatlabThread(DefaultUIStyleTableModel.java:461) at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79) at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:339)
Then the table is completely drawing but without data values.
With Matlab-Version 7.6 the same program works without problems.
If I create a uitable with the same parameters (the only difference is the Parent property) using the command line then it works also in the new version.
I hope someone can help me here or has an similar problem.
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2011년 7월 12일
Report to TMW.

댓글을 달려면 로그인하십시오.

채택된 답변

rei
rei 2011년 7월 28일
I've got same problem, and I found the solution.
previous 'uitable' is not working at MATLAM 2011 anymore. Instead, they provide java-type uitable :
t = uitable(rand(3),{'A','B','C'})
the handle t is not usual MATLAB handle. It's JAVA component. you can operate it by using 'methods':
t.methods
example :
t.getData
t.setData(num2cell(rand(3)))
t.setPosition([100,100,200,300])
Good Luck! :)

추가 답변 (1개)

Daniel
Daniel 2011년 8월 15일
Many thanks for your efforts.
Showing results works with this proposal. But to define a parent-handle for this uitable object is not possible....
With methodsview('javahandle_withcallbacks.com.mathworks.hg.peer.UitablePeer') all methods from uitable object can be seen.
And so it is not possible to integrate the new uitable format in a multi window GUI.
  댓글 수: 1
rei
rei 2011년 8월 25일
How about this? :)
f1 = figure;
f2 = figure;
set(0,'CurrentFigure',f1)
t1 = uitable([1 2 3],{'A','B','C'})
set(0,'CurrentFigure',f2)
t2 = uitable([4 5 6],{'A','B','C'})
t1.setData(num2cell(rand(3)))

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by