Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SamSandq opened this issue Mar 27, 2024 · 3 comments
Open

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

SamSandq opened this issue Mar 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working work-in-progress We are working on this issue

Comments

@SamSandq
Copy link

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.

@frang75 frang75 self-assigned this Mar 27, 2024
@frang75 frang75 added the bug Something isn't working label Mar 27, 2024
@akacastor
Copy link

Just wanted to comment that I ran into the popup_clear() not working on macOS issue also, and the above patch seems to have solved it. Thanks.

@akacastor
Copy link

It would be very helpful to have the above patch incorporated into NAppGUI, to implement popup_clear() in macOS - currently I have to keep a local repo of NAppGUI with the fix applied, as my application uses popup_clear() and crashes without this fix.

@frang75 frang75 added the work-in-progress We are working on this issue label Jan 8, 2025
@frang75
Copy link
Owner

frang75 commented Jan 8, 2025

Fixed in this commit: b61c5cd
Also fixed allow duplicates in PopUp for macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work-in-progress We are working on this issue
Projects
None yet
Development

No branches or pull requests

3 participants