def longTimeSlice(self):
    'returns whether work is finished (no need to call again).'
    finished = True
    tb = self.textBuffer
    if ((tb is not None) and (tb.parser.resumeAtRow < len(tb.lines))):
        tb.parseDocument()
        finished = (tb.parser.resumeAtRow >= len(tb.lines))
    for child in self.zOrder:
        finished = (finished and child.longTimeSlice())
    return finished
returns whether work is finished (no need to call again).
def longTimeSlice(self):
    
    finished = True
    tb = self.textBuffer
    if ((tb is not None) and (tb.parser.resumeAtRow < len(tb.lines))):
        tb.parseDocument()
        finished = (tb.parser.resumeAtRow >= len(tb.lines))
    for child in self.zOrder:
        finished = (finished and child.longTimeSlice())
    return finished