Logo Search packages:      
Sourcecode: qa-assistant version File versions  Download package

def gnomeglade::Base::_map_widgets_into_lists (   self,
  widgetnames 
) [private]

Put sequentially numbered widgets into lists.

e.g. If an object had widgets self.button0, self.button1, ...,
then after a call to object._map_widgets_into_lists(["button"])
object has an attribute self.button == [self.button0, self.button1, ...]."

Definition at line 73 of file gnomeglade.py.

00073                                                   :
        """Put sequentially numbered widgets into lists.
        
        e.g. If an object had widgets self.button0, self.button1, ...,
        then after a call to object._map_widgets_into_lists(["button"])
        object has an attribute self.button == [self.button0, self.button1, ...]."
        """
        for item in widgetnames:
            setattr(self,item, [])
            widgetList = getattr(self,item)
            i = 0
            while 1:
                key = "%s%i"%(item,i)
                try:
                    val = getattr(self, key)
                except AttributeError:
                    break
                widgetList.append(val)
                i += 1


class Component(Base):


Generated by  Doxygen 1.6.0   Back to index