If anyone's remotely interested in this (could just be me), the problem was I copied the widget source from the docs page which was showing the "latest" version of the code. This is more up to date than my currently installed version of qtile. My machine is therefore not running this commit: https://github.com/qtile/qtile/commit/55f92b22b346ccd8a4c3e1867080bc82dbcaf33b#diff-63bc57ab1bd479b27797eccdddb37eac which introduced the change causing my problem.
On Saturday, 26 September 2020 at 09:49:07 UTC+1 elParaguayo wrote: > Ignore this. I copied the code from the docs page but that's out of date > by the look of it. > > On Saturday, 26 September 2020 at 09:43:06 UTC+1 elParaguayo wrote: > >> OK. I think I'm going a bit mad (or am just missing something really >> obvious) but I need some help. >> >> I'm making a fork of the QuickExit widget so that it runs a script prior >> to exiting. It's a very simple change to the existing code. >> >> However, when I add the widget to my config I get: >> AttributeError: ScriptExit has no attribute: add_callbacks >> >> If I look at the source code on github, I can see that that method comes >> from base._Widget. QuickExit subclasses base._TextBox which, in turn, >> subclasses base._Widget. I can therefore see why that method is available >> to the widget. >> >> However, even though my widget does the same subclassing, the method is >> unavailable. I've tested this by just changing the widget name (and >> updating the relevant "add_defaults" line to match the new widget name). >> >> Even stranger, when I look at the widget.base.py source code on my >> computer, there's no "add_callbacks" method there. But, if that's the case, >> then QuickExit shouldn't work, but it does! >> >> This makes no sense to me whatsoever. Does anyone have any ideas where >> I'm going wrong? >> > -- You received this message because you are subscribed to the Google Groups "qtile-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/eca20ea8-e46d-4cce-9d3d-fb8f21324866n%40googlegroups.com.
