Warning: session_start(): open(/var/lib/php/sessions/sess_kihpbd3mqflugq2v4emf5mf9gv, 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
static void fillJMenu(final JMenu m, O... x) {
//ifdef fillJMenu_debug
//print("fillJMenu " + m);
//endifdef
if (x == null) ret;
for i over x: {
O o = x[i], y = get(x, i+1);
if (o instanceof L)
fillJMenu(m, asArray((L) o));
else if (isMenuSeparatorIndicator(o))
m.addSeparator();
ifclass LiveValue
else if (o instanceof LiveValue && o/LiveValue.getType() == S.class && isRunnableX(y)) {
final LiveValue lv = cast o;
final JMenuItem mi = jmenuItem(or2(unCurlyBracket(lv!), "..."), y);
bindLiveValueListenerToComponent(mi, lv, r {
S s = lv!;
if (isCurlyBracketed(s)) {
setEnabled(mi, false);
s = unCurlyBracket(s);
} else
setEnabled(mi, true);
setText(mi, s);
revalidate(m);
});
print("bound live value " + lv + " to menu item " + mi);
m.add(mi);
++i;
}
endif
else if (o instanceof S && isRunnableX(y)) {
m.add(jmenuItem((S) o, y));
++i;
} else if (o instanceof JMenuItem)
m.add((JMenuItem) o); // "call" might use wrong method
else if (o instanceof S || o instanceof Action || o instanceof Component)
call(m, "add", o);
else if (o == null && y instanceof Runnable)
++i; // text == null => disabled item
else
print("Unknown menu item: " + o);
}
}