Warning: session_start(): open(/var/lib/php/sessions/sess_ekgb3g0vuc0r30vl5klgs0seln, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!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 + ".*")));
}
}