I run KOReader with KSM on Kobo A1 LE. I am modifying the frontend/apps/filemanager/filemanager.lua file to add an extra button in the long-press-context-menu for files or folders in file manager.
If I add the button as the first one-line button, the whole thing crashes. If I add the button at the end, after the set-as-home-directory button, all is OK.
This does not happen in KOReader for Kindle. Here is the relevant crash.log. Any help is appreciated.
./luajit: plugins/coverbrowser.koplugin/covermenu.lua:213: attempt to index a nil value
stack traceback:
plugins/coverbrowser.koplugin/covermenu.lua:213: in function 'onFileHold'
frontend/ui/widget/filechooser.lua:331: in function 'onMenuHold'
plugins/coverbrowser.koplugin/listmenu.lua:675: in function 'handleEvent'
frontend/ui/widget/container/inputcontainer.lua:205: in function 'handleEvent'
frontend/ui/widget/container/widgetcontainer.lua:87: in function 'propagateEvent'
frontend/ui/widget/container/widgetcontainer.lua:105: in function 'handleEvent'
frontend/ui/widget/container/widgetcontainer.lua:87: in function 'propagateEvent'
frontend/ui/widget/container/widgetcontainer.lua:105: in function 'handleEvent'
frontend/ui/widget/container/widgetcontainer.lua:87: in function 'propagateEvent'
frontend/ui/widget/container/widgetcontainer.lua:105: in function 'handleEvent'
frontend/ui/widget/container/widgetcontainer.lua:87: in function 'propagateEvent'
...
frontend/ui/widget/container/widgetcontainer.lua:105: in function 'handleEvent'
frontend/ui/widget/container/widgetcontainer.lua:87: in function 'propagateEvent'
frontend/ui/widget/container/widgetcontainer.lua:105: in function 'handleEvent'
frontend/ui/uimanager.lua:454: in function 'sendEvent'
frontend/ui/uimanager.lua:149: in function '__default__'
frontend/ui/uimanager.lua:698: in function 'handleInputEvent'
frontend/ui/uimanager.lua:759: in function 'handleInput'
frontend/ui/uimanager.lua:803: in function 'run'
./reader.lua:195: in main chunk
[C]: at 0x00013fc5
|