def METHOD_NAME(self, ok=0):
    if not self.engine.getprog():
        return False
    text = self.text
    res = self.engine.search_text(text, None, ok)
    if not res:
        text.bell()
        return False
    line, m = res
    i, j = m.span()
    first = "%d.%d" % (line, i)
    last = "%d.%d" % (line, j)
    self.show_hit(first, last)
    self.ok = 1
    return True