The example of adding a menu to a widget in the README does not work because the function changed after awesome 3.6.x
On the README it says you can add a menu to a widget like this:
mytextbox:set_menu(menu,3)
But that results in this error:
stack traceback:
[C]: in function 'assert'
/usr/local/share/awesome/lib/gears/object.lua:34: in upvalue 'find_signal'
/usr/local/share/awesome/lib/gears/object.lua:52: in function 'gears.object.connect_signal'
/home/apm/.config/awesome/radical/init.lua:64: in method 'set_menu'
/home/apm/.config/awesome/rc.lua:246: in main chunk
error: /usr/local/share/awesome/lib/gears/object.lua:34: name must be a string, got: number
But the function on Awesome 3.6.x+ changed to:
local function set_menu(self,menu, event, button_id, mode)
So I got it working by calling the function like this:
mytextbox:set_menu(menu, "button::pressed", 3)
I didn't create a pull request because I don't know if you can specify the parameter you are passing like in Python (I couldn't find it) or if it is better to just change the parameter orders from the function or if I am overlooking something.
The example of adding a menu to a widget in the README does not work because the function changed after awesome 3.6.x
On the README it says you can add a menu to a widget like this:
mytextbox:set_menu(menu,3)But that results in this error:
But the function on Awesome 3.6.x+ changed to:
local function set_menu(self,menu, event, button_id, mode)So I got it working by calling the function like this:
mytextbox:set_menu(menu, "button::pressed", 3)I didn't create a pull request because I don't know if you can specify the parameter you are passing like in Python (I couldn't find it) or if it is better to just change the parameter orders from the function or if I am overlooking something.