Uitable Error with GUI

3 views (last 30 days)
Daniel
Daniel on 12 Jul 2011
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.

Accepted Answer

rei
rei on 28 Jul 2011
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! :)

More Answers (1)

Daniel
Daniel on 15 Aug 2011
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 Comment
rei
rei on 25 Aug 2011
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)))

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!