// IMPORTANT: doesn't work with JTattoo (so not currently in Stefan's OS). listeners are only called on first show+hide // r : runnable or voidfunc(bool) static JCheckBoxMenuItem jCheckBoxMenuItem_dyn(S text, IF0 checked, O r) { JCheckBoxMenuItem mi = jCheckBoxMenuItem(text, false, r); if (checked != null) bindToComponent(mi, r { bool b = isTrue(checked!); ifdef jCheckBoxMenuItem_dyn_debug print("jCheckBoxMenuItem_dyn: " + b + " " + text); endifdef setChecked(mi, b); }, r { ifdef jCheckBoxMenuItem_dyn_debug print("jCheckBoxMenuItem_dyn: hiding " + text); endifdef }); ret mi; } static JCheckBoxMenuItem jCheckBoxMenuItem_dyn(S text, IF0 checked, IVF1 r) { ret jCheckBoxMenuItem_dyn(text, checked, (O) r); }