Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: Use local variable devices instead of net.devices #559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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