Hi Leonardo, Well I could reproduce the problem now, also in Linux. It seems that this is not a GTK bug, but a consequence of the blinking timeout of the cursor in the TextView widget. The complete error I receive in Linux is this: ..... (<unknown>:1880): Gtk-WARNING **: GtkTextView - did not receive focus-out-event. If you connect a handler to this signal, it must return FALSE so the entry gets the event as well Gtk-ERROR **: file gtktextview.c: line 4482 (blink_cb): assertion failed: (GTK_WIDGET_HAS_FOCUS (text_view)) aborting... ..... There is a Perl newsgroup entry explaining the issue: http://mail.gnome.org/archives/gtk-perl-list/2005-September/msg00143.html There are 2 solutions none of which can be realized with the current version of the GTK-server: 1) continue your program using g_idle_add(). This function however needs an address of a new function, which never can be given with interpreted languages; 2) connect the signal with 'g_signal_connect_after' as you suggested yourself before. The GTK-server currently only uses 'g_signal_connect', so a change on my side is needed. The last option is easy to implement, I could add an extra internal call like "gtk_server_connect_after" with a similar syntax. Or the current implementation could be changed to 'g_signal_connect_after' completely, but I have to investigate the consequences of this change. As soon as I have a fix ready I'll let you know. Br, Peter Citeren Leonardo Cecchi <leonardoce@xxxxxxxxxxxx>: > Thanks Peter for the reply! > To reproduce the problem on your e-text reader in newlisp I had: > > 1) Commented the lines > > # LEONARDO (GTK:gtkp "gtk_text_view_set_editable" entry 0) > # LEONARDO (GTK:gtkp "gtk_text_view_set_cursor_visible" entry 0) > > 2) Added the line > > # ADD LEONARDO > (GTK:gtkp "gtk_server_connect" entry "focus-out-event Trial") > > To reproduce the problem you can: > > 1) Place the focus in the textview (I also wrote some text) > 2) Try to load a file > > I think the problem is in the blinking cursor..... so if it's not visible > the issue doesn't show up. > I have only one GTK version on my computer and the gtk_check_version say: > > Gtk+ version too new (major mismatch) > > I really don't know what's happening. > I have Gtk 2.6.7 and I verified this version number with the Gtk Demo > application. > I have checked my path and in my harddisk I have found only one > libgtk-win32-2.0-0.dll. > I will try on linux and let you know the results. > > Thanks again and compliments for your e-text application. > > Leonardo > > > > -----Messaggio originale----- > Da: gtk-server-bounce@xxxxxxxxxxxxx [mailto:gtk-server-bounce@xxxxxxxxxxxxx] > Per conto di Peter van Eerten > Inviato: sabato 12 novembre 2005 11.58 > A: gtk-server@xxxxxxxxxxxxx > Oggetto: [gtk-server] Re: GtkTextView and focus-out-event > > Hi Leonardo, > > Unfortunately I cannot reproduce your problem. The system I use is Win2000, > GTK- > server 2.0.5 and GTK 2.6.8-1. > > In my e-text reader, which I programmed with newLisp, I can connect the > 'focus- > out-event' signal to the TextView widget without any warnings. My code looks > like this: > > (GTK:gtkp "gtk_server_connect" entry "focus-out-event Trial") > > The variable 'entry' contains the pointer to the TextView widget. It is the > last line in my TextView definitions. The logfile shows: > > .... > SCRIPT: gtk_settings_get_default > SERVER: 15617320 > SCRIPT: gtk_widget_set_name 15696056 textview > SERVER: ok > SCRIPT: gtk_server_connect 15696056 focus-out-event Trial > SERVER: ok > SCRIPT: gtk_frame_new NULL > SERVER: 15779744 > .... > > The bug-report you mention concerns GTK 2.0.x, so I assume it is not valid > for > your GTK 2.6.x. > > So it appears you suffer from a GTK 2.0.x problem. You can check your > current > GTK version with the command "gtk_check_version". > > Please make sure you have only one GTK installation on your machine, and > that > you have the correct GTK DLL's in your path. If this is the case, maybe you > could try to upgrade to the latest GTK environment, which is downloadable > from > http://gimp-win.sourceforge.net/. > > If all this does not work out, you could try to perform a 'grabfocus' > command > on the TextView first. > > Also you could try to use my e-text viewer with newLisp and add the same > signal, to see if the problem occurs again. > > The GTK-server currently connects additional signals with > the 'g_signal_connect' command. So connecting additional signals with > the 'g_signal_connect_after' command cannot be performed (yet). > > Please let me the outcome of this problem. > > Best regards > Peter > > > Citeren Leonardo Cecchi <leonardoce@xxxxxxxxxxxx>: > > > Hi, > > > > I'm trying to connect to "focus-out-event" on a textview but I obtain an > > assertion error and the program exit with an error status. > > The assertion error looks like this: > > > > Assertion failed: (GTK_WIDGET_HAS_FOCUS (text_view)) on gtktextview.c in > > line 4482 > > > > I found an issue on GtkEntry that is really similiar: > > > > http://bugzilla.gnome.org/show_bug.cgi?id=78305 > > > > I think the problem is that I should connect to focus-out-event with > > g_signal_connect_after instead of g_signal_connect. > > I'm using a code like this: > > > > (send-gtk "gtk_server_connect " textview " focus-out-event \"Trial\"") > > > > Where I'm wrong? I'm probably using gtk_server_connect in a wrong > manner... > > I'm working with Clisp 2.35, GtkServer 2.0 build 5, Gtk 2.6.7, Windows XP > > Sp2. > > > > Thanks and excuse me for my bad english. > > > > Leonardo -- http://www.gtk-server.org