!7 sclass Entry { S name; long size, compressedSize; sS _fieldOrder = "name size compressedSize"; } cmodule ArchiveContents > DynObjectTable { File archive; start { itemToMap = func(Entry e) -> Map { litorderedmap( "Name" := e.name, "Size" := formatInt(e.size, 14), "Compressed size" := formatInt(e.compressedSize, 14), )}; } visual withComputing(r { // sorting numbers properly doesn't work yet addRowSorter(table()); rowSorter_setComparators(table(), 1, new Comparator { public int compare(O a, O b) { print("Comparing: " + a + " / " + b + " (" + shortClassName(a) + ")"); ret cmp(a, b); } }, 2, alphaNumComparator()); }, withCenteredButtons(super, "Load archive...", rThread loadArchive)); void loadArchive enter { loadArchive(showFileChooser()); } // API void loadArchive(File f) { setField(archive := f); setModuleName(joinNempties(": ", "Archive contents", f2s(f))); setData(map(listZipEntries(f), e -> nu Entry( name := e.getName(), size := e.getSize(), compressedSize := e.getCompressedSize() ))); } }