-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fails during run when trying to add a Menu #40
Comments
Workaround: Create the menu before the window:
This looks like the underlying issue is a Windows-specific problem. Linux also crashes the application, but it provides an error reason why:
However, Windows doesn't share the helpful message:
|
OK, we can solve this with a different API design; I'll have the UI handle recall whether or not menus have been initialized, and if they have, prevent you from changing menus. Thanks for figuring this out. |
Would it make sense for the WindowType enum to have NoMenubar and HasMenubar options with a menu inside? |
Could one possible fix is maybe change the fifth enum parameter of the So, if we want no menu bar:
And with menu bar:
Having this style of api means:
|
Using the basic example as a baseline to make sure the error wasn't on my end, I tried to add a menu, changing the window type to
HasMenubar
and addinglet menu = Menu::new(&ui, "Test Menu");
This complies without issues, but fails instantly at runtime. This happens whenever a new menu is defined.The text was updated successfully, but these errors were encountered: