X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosDataChooser.java;h=c6d53a311eaf37c8110d73b9e38c6e6251878208;hp=8758fc34df213d000f3e770fd7499b5679f15e9a;hb=e6eb659b0e984515a33b3ddabfe8325742a952da;hpb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a diff --git a/altosuilib/AltosDataChooser.java b/altosuilib/AltosDataChooser.java index 8758fc34..c6d53a31 100644 --- a/altosuilib/AltosDataChooser.java +++ b/altosuilib/AltosDataChooser.java @@ -36,7 +36,7 @@ public class AltosDataChooser extends JFileChooser { return file; } - public AltosStateIterable runDialog() { + public AltosRecordSet runDialog() { int ret; ret = showOpenDialog(frame); @@ -47,7 +47,7 @@ public class AltosDataChooser extends JFileChooser { filename = file.getName(); try { if (filename.endsWith("eeprom")) { - FileInputStream in = new FileInputStream(file); + FileReader in = new FileReader(file); return new AltosEepromFile(in); } else if (filename.endsWith("telem")) { FileInputStream in = new FileInputStream(file); @@ -60,6 +60,11 @@ public class AltosDataChooser extends JFileChooser { fe.getMessage(), "Cannot open file", JOptionPane.ERROR_MESSAGE); + } catch (IOException ie) { + JOptionPane.showMessageDialog(frame, + ie.getMessage(), + "Error reading file", + JOptionPane.ERROR_MESSAGE); } } return null;