frang75/nappgui_src

Cannot clear PopUp, popup_clear(..) not working on Mac

SamSandq opened this issue · 1 comments

I needed to have one popup button clear and re-populate another popup button, and discovered that the popup_clear(...) does not work on Mac.

Checking the code, it's not implemented. Correct by inserting the following code in ospopup.m : ospopup_elem, at line 180:

    else if (op == ekCTRL_OP_DEL) {
        [((OSXPopUp*)popup) removeItemAtIndex: idx];
    }

This seems to do the trick, but there might be other ramifications as well.