Very simple menu based on example from README.md does not work
I am getting the error error: .../romildo/.config/awesome/radical/layout/vertical.lua:200: attempt to compare string with number when trying to show a menu based on the example from the README.md.
Here is the relevant part of my configuration file rc.lua:
local menu = radical.context{}
menu:add_item {text="Item 1"}
menu:add_item {text="Item 2"}
local mytextbox = wibox.widget.textbox("MENU")
mytextbox:set_menu(menu,1)
left_layout:add(mytextbox)
When mouse button 1 is pressed over the textbox, the following error is reported:
stack traceback:
.../romildo/.config/awesome/radical/layout/vertical.lua:200: in function 'compute_geo'
.../romildo/.config/awesome/radical/layout/vertical.lua:244: in function 'fit'
/home/romildo/.config/awesome/radical/base.lua:409: in function 'setter'
/home/romildo/.config/awesome/radical/object.lua:60: in function </home/romildo/.config/awesome/radical/object.lua:55>
/home/romildo/.config/awesome/radical/init.lua:29: in function 'press'
/usr/share/awesome/lib/awful/button.lua:42: in function </usr/share/awesome/lib/awful/button.lua:42>
[C]: in function 'emit_signal'
/usr/share/awesome/lib/wibox/widget/base.lua:59: in function </usr/share/awesome/lib/wibox/widget/base.lua:27>
(tail call): ?
/usr/share/awesome/lib/gears/object.lua:68: in function 'emit_signal'
/usr/share/awesome/lib/wibox/drawable.lua:279: in function </usr/share/awesome/lib/wibox/drawable.lua:273>
error: .../romildo/.config/awesome/radical/layout/vertical.lua:200: attempt to compare string with number
What may I be missing?
Hello,
What Awesome version are you using? I just tried your code and it worked fine on 3.5.6. Please note that Radical doesn't support 3.4 and git-master version more recent than July 2015. The "fit" function signature changed upstream and that broke most widgets designed for Awesome 3.5
I am using awesome-3.5.6:
% awesome --version
awesome v3.5.6 (For Those About To Rock)
• Build: Oct 9 2015 08:20:10 for x86_64 by gcc version 5.2.0 (@jrm.no-ip.org)
• Compiled against Lua 5.1.5 (running with Lua 5.1)
• D-Bus support: ✔
This issue seems to be related to the location of the theme files. For instance, it does not work with a theme installed at ~/.config/awesome/themes/bamboo/, but it works with the theme installed at /usr/share/awesome/themes/zenburn
any news ?
after some research, @romildo your theme.menu_height/width values should be integers instead of strings.