!7 sclass NamedList { S name; L lines; } cmodule SomeObjects > DynObjectTable { S globalID = aGlobalID(); L lists = synchroList(); transient SingleComponentPanel scp; start { itemToMap = func(NamedList l) -> Map { litorderedmap("Name" := l.name, lines := l(l.lines)) }; defaultAction = voidfunc(final NamedList l) { final SimpleLiveValue lvText = stringLiveValue(lines(l.lines)); lvText.onChange(dm_rstWithPostDelay(module(), 1000, r { l.lines = lines(lvText!); blubberblub; })); setSCPComponent(scp, jSection("List: " + l.name, focusOnShow(jLiveValueWordWrapTypeWriterTextArea_bothWays(lvText)))); }; blubberblub; } void onPersisted { saveTextFile(javaxDataDir("Some Lists/" + globalID + ".struct"), dm_persistenceStruct()); } void blubberblub { setData_force(lists); } visualize { JComponent c = super.visualize(); ret jhsplit(withCenteredButtonsOnTop(c, "Add list..." := rThread { inputText("Name of new list", voidfunc(S name) { NamedList l = nu(NamedList, +name); lists.add(l); blubberblub; doubleClickItem(l); }); }, tableDependentButton(table, "Delete" := rThread { logQuoted(javaxDataDir("Some Lists/" + globalID + ".deleted"), struct(selected())); lists.remove(selected()); setSCPComponent(scp, emptyContent()); blubberblub; }) ), scp = singleComponentPanel(emptyContent())); } JComponent emptyContent() { ret jSection("Content"); } enhanceFrame { titlePopupMenuItems(f, "Backup in: " + f2s(javaxDataDir("Some Lists/" + globalID + ".*"))); } }