should get_new_window_id
reserve an id to prevent conflicts?
#418
-
#include "webui.h"
int main() {
size_t id1 = webui_get_new_window_id();
size_t id2 = webui_get_new_window_id();
printf("id1: %d\n", id1); // id1: 1
printf("id2: %d\n", id2); // id2: 1
size_t w = webui_new_window_id(id1);
webui_show(w, "<html><head><script src=\"webui.js\"></script></head> Hello World ! </html>");
webui_wait();
return 0;
} Currently, calling I wasn't sure if it's a bug, a feature request, or neither, so opening a question might be a good starting point. |
Beta Was this translation helpful? Give feedback.
Answered by
hassandraga
Jun 15, 2024
Replies: 1 comment 1 reply
-
Good catch! 👍 size_t id1 = webui_get_new_window_id();
size_t id2 = webui_get_new_window_id();
size_t w = webui_new_window_id(id1);
size_t w = webui_new_window_id(id2); // ID already used error It's a bug, I'm going to fix it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed (15d519c)