You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you remove the sub.Hide() line then the sub menu item appears; otherwise, it does not. macOS does not have this problem, and I did not test on Linux. If you remove the sleep, then the library throws panics about Invalid menu items. The changes in #206 did not solve the errors. These are the errors generated when the time.Sleep() is removed:
ERROR systray: systray_windows.go:908 Unable to addOrUpdateMenuItem: Invalid menu handle. [error=Unable to addOrUpdateMenuItem: %v error_location=github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908) error_text=Unable to addOrUpdateMenuItem: Invalid menu handle. error_type=errors.Error]
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.(*MenuItem).update (systray.go:220)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.AddMenuItem (systray.go:119)
ERROR systray: systray_windows.go:908 at main.main.func1 (main.go:9)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.Register.func2 (systray.go:94)
ERROR systray: systray_windows.go:908 at runtime.goexit (asm_amd64.s:1581)
ERROR systray: systray_windows.go:908 Caused by: Invalid menu handle.
ERROR systray: systray_windows.go:908 Unable to addOrUpdateMenuItem: Invalid menu handle. [error=Unable to addOrUpdateMenuItem: %v error_location=github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908) error_text=Unable to addOrUpdateMenuItem: Invalid menu handle. error_type=errors.Error]
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.(*MenuItem).update (systray.go:220)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.AddMenuItem (systray.go:119)
ERROR systray: systray_windows.go:908 at main.main.func1 (main.go:10)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.Register.func2 (systray.go:94)
ERROR systray: systray_windows.go:908 at runtime.goexit (asm_amd64.s:1581)
ERROR systray: systray_windows.go:908 Caused by: Invalid menu handle.
ERROR systray: systray_windows.go:908 Unable to addOrUpdateMenuItem: Invalid menu handle. [error=Unable to addOrUpdateMenuItem: %v error_location=github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908) error_text=Unable to addOrUpdateMenuItem: Invalid menu handle. error_type=errors.Error]
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.(*MenuItem).update (systray.go:220)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.(*MenuItem).AddSubMenuItem (systray.go:144)
ERROR systray: systray_windows.go:908 at main.main.func1 (main.go:11)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.Register.func2 (systray.go:94)
ERROR systray: systray_windows.go:908 at runtime.goexit (asm_amd64.s:1581)
ERROR systray: systray_windows.go:908 Caused by: Invalid menu handle.
ERROR systray: systray_windows.go:932 Unable to hideMenuItem: Invalid menu handle. [error=Unable to hideMenuItem: %v error_location=github.com/getlantern/systray.hideMenuItem (systray_windows.go:932) error_text=Unable to hideMenuItem: Invalid menu handle. error_type=errors.Error]
ERROR systray: systray_windows.go:932 at github.com/getlantern/systray.hideMenuItem (systray_windows.go:932)
ERROR systray: systray_windows.go:932 at github.com/getlantern/systray.(*MenuItem).Hide (systray.go:190)
ERROR systray: systray_windows.go:932 at main.main.func1 (main.go:12)
ERROR systray: systray_windows.go:932 at github.com/getlantern/systray.Register.func2 (systray.go:94)
ERROR systray: systray_windows.go:932 at runtime.goexit (asm_amd64.s:1581)
ERROR systray: systray_windows.go:932 Caused by: Invalid menu handle.
ERROR systray: systray_windows.go:908 Unable to addOrUpdateMenuItem: Invalid menu handle. [error=Unable to addOrUpdateMenuItem: %v error_location=github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908) error_text=Unable to addOrUpdateMenuItem: Invalid menu handle. error_type=errors.Error]
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.addOrUpdateMenuItem (systray_windows.go:908)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.showMenuItem (systray_windows.go:938)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.(*MenuItem).Show (systray.go:195)
ERROR systray: systray_windows.go:908 at main.main.func1 (main.go:13)
ERROR systray: systray_windows.go:908 at github.com/getlantern/systray.Register.func2 (systray.go:94)
ERROR systray: systray_windows.go:908 at runtime.goexit (asm_amd64.s:1581)
ERROR systray: systray_windows.go:908 Caused by: Invalid menu handle.
The text was updated successfully, but these errors were encountered:
When running .Show() on menu item with sub menu items, the sub menu items do not appear. I'm not real sure how to work around this. Ideas?
This reproduces the issue:
If you remove the
sub.Hide()
line then the sub menu item appears; otherwise, it does not. macOS does not have this problem, and I did not test on Linux. If you remove the sleep, then the library throws panics about Invalid menu items. The changes in #206 did not solve the errors. These are the errors generated when thetime.Sleep()
is removed:The text was updated successfully, but these errors were encountered: