asmagill / hammerspoon_asm

Hammerspoon modules in progress...
MIT License
53 stars 12 forks source link

hs._asm.guitk.menubar.legacy `nil` error #13

Closed latenitefilms closed 5 years ago

latenitefilms commented 6 years ago

FYI:

2018-05-31 16:27:34: ********
2018-05-31 16:27:34: 16:27:34 ERROR:   LuaSkin: hs.eventtap callback error: ...mandPost/src/extensions/hs/_asm/guitk/menubar/legacy.lua:195: attempt to index a nil value (field '_statusitem')
stack traceback:
    ...mandPost/src/extensions/hs/_asm/guitk/menubar/legacy.lua:195: in method 'setMenu'
    .../CommandPost/src/plugins/finalcutpro/viewer/overlays.lua:598: in function <.../CommandPost/src/plugins/finalcutpro/viewer/overlays.lua:590>
2018-05-31 16:27:34: ********
latenitefilms commented 6 years ago

Here's my workaround:

                mod._menu:returnToMenuBar()
                mod._menu:setMenu(menu):removeFromMenuBar()
                mod._menu:popupMenu(location, true)

It seems like the legacy code always expects the menubar menu to be in the system menubar?

asmagill commented 5 years ago

That's the one I just pushed a fix for and mentioned in the 2.0 roadmap