def ListBoxIterator(listbox, selectedOnly = False):
i = listbox.firstItem()
while i:
if selectedOnly and not i.isSelected():
continue
yield i
i = i.next()
return
If I'm not mistaken, passing True to selectedOnly will make that function loop forever after the first unselected item. How about this:
def ListBoxIterator(listbox, selectedOnly = False):
i = listbox.firstItem()
while i:
if (selectedOnly and i.isSelected()) or not selectedOnly:
yield i
i = i.next()
returnCiao, Gordon
_______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
