You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • thanks, so it is just burning extra CPU in this case but memory is not affected as you probably need to pass one such function for each menu item anyway no matter how big or small.

    Anyway, I tried to learn how E.showMenu() works. So I started Bangle 2 emulator, copy pasted example from http://www.espruino.com/Reference#l_E_showMenu 'as is' and

    • the submenu item is broken - the }, ending part from back: line probably belongs to line above it but it still breaks with Uncaught Error: Cannot read property 'title' of undefined until I also comment out two items with undefined
    • when showing the menu repeatedly via E.showMenu(mainmenu) call and just clicking the Exit item I need to click twice to close it and everytime the menu is shown and hidden I get 5 variables less free visible in process.memory()

About

Avatar for fanoush @fanoush started