Exemplo n.º 1
0
    def __init__(self, contents):
        """
        contents -- list to copy into this object

        Changes made to this object (when it is treated as a list) are
        detected automatically and will cause ListBox objects using
        this list walker to be updated.
        """
        if not type(contents) == type([]) and not hasattr(contents, '__getitem__'):
            raise ListWalkerError, "SimpleListWalker expecting list like object, got: "+`contents`
        MonitoredList.__init__(self, contents)
        self.focus = 0
Exemplo n.º 2
0
    def __init__(self, contents):
        """
        contents -- list to copy into this object

        Changes made to this object (when it is treated as a list) are
        detected automatically and will cause ListBox objects using
        this list walker to be updated.
        """
        if not type(contents) == type([]) and not hasattr(
                contents, '__getitem__'):
            raise ListWalkerError, "SimpleListWalker expecting list like object, got: " + ` contents `
        MonitoredList.__init__(self, contents)
        self.focus = 0