

def dockable_should_close(self):
    ' Should the current DockControl be closed before creating the new\n            one?\n        '
    element = group.element
    if (element is None):
        element = self.ui.view.content
    if (not isinstance(element, Group)):
        element = Group().set(content=[element])
    group = Group().set(content=[element])
    self._view = View().set(**self.ui.view.get()).set(content=group, title='')
    self._context = self.ui.context.copy()
    self._handler = self.ui.handler
    return (self.should_close or (self.element is None))

dataset/ETHPy150Open enthought/traitsui/traitsui/dockable_view_element.py DockableViewElement.dockable_should_close/VarMisuse@14/47 `self`->`group`