!7 cmodule FindHomeStation { switchable File file; switchable bool with256; // go to 256 pixels wide transient L allImages; transient JTabbedPane tabs; transient MultiLevelRecognizer1 rec; start { tabs = jtabs(); allImages = listImageFiles(vectorCamDir()); if (file == null) randomImage(); else recognize(); } void randomImage { File f = random(allImages); if (f == null) ret with print("No images"); setField(file := f); recognize(); } void recognize { rec = new MultiLevelRecognizer1(imageSnippetFile(#1102886), file); if (with256) rec.widths.add(256); clearTabs(tabs); rec.tabs = tabs; print(rec.go()); } visual northAndCenter( jCenteredSection("File", dm_calculatedCenteredLabel(() -> fileName(file))), withCenteredButtons(tabs, "Random image", rThread randomImage)); }