I use the following method to create a text widget, note the insert call,
this will eliminate the gtk_text_set_point error.
self.tempTextArea = GtkText()
self.tempTextArea.set_editable(FALSE)
self.tempTextArea.set_line_wrap(TRUE)
self.tempTextArea.set_word_wrap(FALSE)
self.tempTextArea.insert(None, None, None, "Some Text")
Hope this helps...
----Original Message-----
Date: Sat, 11 Nov 2000 12:36:14 +0000
From: LF <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [pygtk] GTK bug? Or PyGTK bug? Or annoyance (better way to do
it?)
I'm trying to make a GtkText box, give it some text, and have it as a
static display in a window. I don't like "Gtk-CRITICAL" warnings that
don't seem to matter, but I *REALLY* don't like "Gtk-CRITICAL" and Xlib
errors that lock things up. Ewww!
Pardon the *really* dumb variable names.
-----
a_message_box = GtkText()
a_message_box.insert_text("this is a test")
a_message_box.set_editable(FALSE)
a_main_vbox.add(a_message_box)
a_message_box.show()
-----
When I run it,
-----
Gtk-CRITICAL **: file gtktext.c: line 879 (gtk_text_set_point):
assertion `index <= TEXT_LENGTH (text)' failed.
-----
There doesn't seem to be any problem in the UI, and everything works
fine. Sometimes, however (about once out of every five times, but it
varies), this happens
-----
Gtk-CRITICAL **: file gtktext.c: line 879 (gtk_text_set_point):
assertion `index <= TEXT_LENGTH (text)' failed.
Xlib: unexpected async reply (sequence 0x7c8)!
-----
And after a moment, the whole app locks. Must quit with Ctrl-\ in the
terminal. Any guesses or fixes? Especially fixes or workarounds?
thanks!
-lf
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk