Exception in thread "IQM-AWT-Event-Queue" java.lang.NullPointerException
at at.mug.iqm.commons.io.TableFileWriter.write(TableFileWriter.java:202)
at at.mug.iqm.commons.io.TableFileWriter.run(TableFileWriter.java:373)
at at.mug.iqm.gui.menu.FileMenu$11.run(FileMenu.java:914)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
It seems that in FileMenu the table is already converted to the desired format and in TableFileWriter a List of IqmDataBoxes is missing or is converted again.
Anonymous
I agree, this is a bug in the table saving workflow.
FileMenu should not convert the data, but hand over the entire table object to TableFileWriter, which then takes care of writing the data.
The FileMenu must not do any conversions, but only select the data to be saved ('export model' function in the SaveTableDialog). We must generalize the TableFileWriter class in some ways:
writemethods must be able to distinguish whether the input is aList<IqmDatabox>, aJTableor anat.mug.iqm.api.model.ITableModel. Then, based on the selected file extension, transform the data (e.g. into CSV) and hand it over to the correct low-level writer class (e.g. PlainTextFileWriter).Related
Commit: [r531]