Menu

#65 saving of table(s) other than jtb format does not work

3.3
closed
kainzp
2015-06-10
2015-05-29
iqmmug
No
  • saving of a table other than in jtb format throws a NullPointerException:

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.

Discussion

  • kainzp

    kainzp - 2015-05-29

    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:

    • The write methods must be able to distinguish whether the input is a List<IqmDatabox>, a JTable or an at.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).
    • Right now, we also can't produce a proper non-JTB file when a JTable is given to the TableFileWriter, so this is also subject to be implemented.
     
  • iqmmug

    iqmmug - 2015-06-10
    • Solved in [r531] by reverting TableFileWriter to an older Version
     

    Related

    Commit: [r531]

  • iqmmug

    iqmmug - 2015-06-10
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB