dontpanic92 / wxGo

Golang wxWidgets Wrapper
Other
403 stars 51 forks source link

A MenuItem ID of Zero does not work under Mac 『macOS 10.12.6』 #34

Closed linkerlin closed 6 years ago

linkerlin commented 6 years ago

./src/osx/menuitem_osx.cpp(39): assert "id != 0 || pSubMenu != __null" failed in wxMenuItem(): A MenuItem ID of Zero does not work under Mac

Call stack: [01] wxMenuItem::wxMenuItem(wxMenu, int, wxString const&, wxString const&, wxItemKind, wxMenu) [02] wxAuiGenericToolBarArt::ShowDropDown(wxWindow, wxAuiToolBarItemArray const&) [03] wxAuiToolBar::OnLeftDown(wxMouseEvent&) [04] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler) [05] wxEvtHandler::ProcessEventLocally(wxEvent&) [06] wxEvtHandler::ProcessEvent(wxEvent&)
[07] wxEvtHandler::SafelyProcessEvent(wxEvent&) [08] wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent) [09] wxWidgetCocoaImpl::mouseEvent(NSEvent, NSView, void) [10] -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] [11] -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] [12] -[NSWindow(NSEventRouting) sendEvent:]
[13] -[wxNSWindow sendEvent:]
[14] -[NSApplication(NSEvent) sendEvent:]
[15] -[wxNSApplication sendEvent:]
[16] -[NSApplication run]
[17] wxGUIEventLoop::OSXDoRun()
[18] wxCFEventLoop::DoRun()
[19] wxEventLoopBase::Run()
[20] wxAppConsoleBase::MainLoop()
[21] _wrap_App_MainLoop_wx_d5626d6e57cb98ce

Do you want to stop the program? You can also choose [Cancel] to suppress further warnings.

dontpanic92 commented 6 years ago

It seems that the cause is very clear - wxWidgets doesn't support 0 as Menu Item Id.

Can you provide some sample code that causes this error?

dontpanic92 commented 6 years ago

Please reopen this issue if you have further questions