diff --git a/redo/box.c b/redo/box.c index 5888383a..6dba03ba 100644 --- a/redo/box.c +++ b/redo/box.c @@ -267,8 +267,6 @@ static void boxDelete(uiBox *ss, uintmax_t index) struct boxControl *bc; uiControl *removed; - // TODO rearrange this - // TODO sync call order with that of Destroy() bc = ptrArrayIndex(b->controls, struct boxControl *, index); removed = bc->c; ptrArrayDelete(b->controls, index); diff --git a/redo/ui.idl b/redo/ui.idl index 5b6188bb..864fad0e 100644 --- a/redo/ui.idl +++ b/redo/ui.idl @@ -158,7 +158,7 @@ func NewGroup(text *const char) *Group; // spinbox/slider rules: // setting value outside of range will automatically clamp // initial value is minimum -// TODO what happens if max > min? max == min? +// complaint if min >= max? interface Spinbox from Control { func Value(void) intmax_t; diff --git a/redo/windows/spinbox.c b/redo/windows/spinbox.c index 54beb030..eed5e80f 100644 --- a/redo/windows/spinbox.c +++ b/redo/windows/spinbox.c @@ -218,6 +218,9 @@ uiSpinbox *uiNewSpinbox(intmax_t min, intmax_t max) { struct spinbox *s; + if (min >= max) + complain("error: min >= max in uiNewSpinbox()"); + s = (struct spinbox *) uiNewControl(uiTypeSpinbox()); s->hwnd = uiWindowsUtilCreateControlHWND(WS_EX_CLIENTEDGE,