Problem with entering new line into TextView

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problem with entering new line into TextView

Petr Hracek
Hi folks,

when I am updating TextView form the thread
then without any newline character all works fine,

But when I would like to insert a new line character
it failed with:
Gtk:ERROR:gtktextview.c:3810:gtk_text_view_validate_onscreen: assertion
failed: (priv->onscreen_validated)

I not that something is wrong but I could not image what?
Class looks like:
import section


class RunLoggingHandler(logging.Handler):
     def __init__(self, textbuffer):
         self.textbuffer = textbuffer

     def utf8conv(self,x):
             return unicode(x,'utf8')
             return x

     def emit(self, record):
         it = self.textbuffer.get_end_iter()

class runWindow(object):
     def __init__(self,  parent, finalWindow, builder, assistant):
         self.parent = parent
         self.finalWindow = finalWindow
         self.runWindow = builder.get_object("runWindow")
         self.textViewLog = builder.get_object("textViewLog")
         self.cancelBtn = builder.get_object("cancelRunBtn")
         self.textbuffer = self.textViewLog.get_buffer()
         self.assistant = assistant
         self.tlh = RunLoggingHandler(self.textbuffer)
         FORMAT = "%(levelname)s %(message)s"

     def open_window(self, widget, data=None):
         dirname, projectname = self.parent.pathWindow.get_data()

     def visibility_event(self, widget, data=None):"ListView Visibility event")
         thread = threading.Thread(target=self.devassistant_start)
         if not thread.is_alive():

     def devassistant_start(self):"Thread run")
         path =
         pr = path_runner.PathRunner(path, self.parent.kwargs)
         except exceptions.ExecutionException as ex:

Best regards / S pozdravem
Petr Hracek

pygtk mailing list   [hidden email]
Read the PyGTK FAQ: