One of the tasks listed in #729 is to make the APIs of things like task panes align with the API of IWidget. An obstacle to this is that Tasks create methods generally expect a parent argument, which allows lazier creation:
t = TasksThing()
...
t.create(parent)
where with the current widget API this looks like:
t = WidgetThing()
...
t.parent = parent
t.create()
This issue proposes adding an optionalparent argument to IWidget.create that does something like:
def create(self, parent=None):
if parent is not None:
self.parent = parent
...
which can probably be achieved by simply adding this to the base MWidget.create() and then updating the signatures and super calls appropriately.
One of the tasks listed in #729 is to make the APIs of things like task panes align with the API of
IWidget
. An obstacle to this is that Tasks create methods generally expect aparent
argument, which allows lazier creation:where with the current widget API this looks like:
This issue proposes adding an optional
parent
argument toIWidget.create
that does something like:which can probably be achieved by simply adding this to the base
MWidget.create()
and then updating the signatures and super calls appropriately.