Warning: session_start(): open(/var/lib/php/sessions/sess_698nb94rm7amp1rb5fv52o2jpk, 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
module ShowRandomColor > DynSCP {
RGB color;
S yourName;
visualize2 {
if (color == null) setField(color := randomColor());
JComponent theForm = withRightMargin(makeForm2(
"I call this color:", "bla",
"How do you call this color?", centerAndEastWithMargin(
onEnter(dm_fieldTextField('yourName), rThread saveName),
jbutton("Save", rThread saveName))));
print("pref=" + getPreferredSize(theForm));
ret withRightAlignedButtons(
centerAndSouthWithMargin(
northAndCenterWithMargins(
jRightAlignedLiveValueLabel(mapLiveValue(func(O color) -> S { "Color Code: #" + color }, S, dm_fieldLiveValue('color))),
jSection("THE COLOR", singleColorPanel(toColor(color)))),
jPreferredSizeToMinSize(theForm)),
"New Color", rThread newColor);
}
void newColor enter {
setField(color := randomColor());
revisualize2();
}
void saveName enter {
}
}