def addElement(self, draw, kind, name, reference, width, sep, extraWidth=0):
    if app.config.strict_debug:
        assert isinstance(name, unicode)
        assert isinstance(sep, unicode)
        assert ((width is None) or isinstance(width, int))
        assert isinstance(extraWidth, int)
        if (reference is not None):
            assert isinstance(reference, dict)
            assert (name in reference)
    if (self.group is not None):
        self.group.append(len(self.controlList))
    element = {'dict': reference, 'draw': draw, 'name': name, 'sep': sep, 'type': kind, 'width': (width if (width is not None) else (len(name) + extraWidth))}
    self.controlList.append(element)
    return element
def addElement(self, draw, kind, name, reference, width, sep, extraWidth=0):
    if app.config.strict_debug:
        assert isinstance(name, unicode)
        assert isinstance(sep, unicode)
        assert ((width is None) or isinstance(width, int))
        assert isinstance(extraWidth, int)
        if (reference is not None):
            assert isinstance(reference, dict)
            assert (name in reference)
    if (self.group is not None):
        self.group.append(len(self.controlList))
    element = {'dict': reference, 'draw': draw, 'name': name, 'sep': sep, 'type': kind, 'width': (width if (width is not None) else (len(name) + extraWidth))}
    self.controlList.append(element)
    return element