Skip to content

Conversation

greenfork
Copy link

Using widget:set_markup in the setting function triggers the following error:

/usr/share/awesome/lib/gears/object.lua:189: Cannot set 'devices' on
wibox.widget.textbox (table: 0xXXXXX) because it is read-only.

This happens because of the definition of net:

local net = { widget = args.widget or wibox.widget.textbox(), devices: {} }

The error complains about the devices field.

Everything works with widget:set_text, I suppose set_markup needs all the fields in the widget.

I have moved the table field to a local variable to allow using it with set_markup.

Using widget:set_markup in the setting function triggers the following
error:

/usr/share/awesome/lib/gears/object.lua:189: Cannot set 'devices' on
wibox.widget.textbox (table: 0xXXXXX) because it is read-only.

This happens because of the definition of net:

	local net = { widget = args.widget or wibox.widget.textbox(), devices: {} }

The error complains about the devices field.

Everything works with widget:set_text, I suppose set_markup needs
all the fields in the widget.

I have moved the table field to a local variable to allow using it
with set_markup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant