[gtk-server] Re: GtkTextView and focus-out-event

  • From: Peter van Eerten <administrator@xxxxxxxxxxxxxx>
  • To: gtk-server@xxxxxxxxxxxxx
  • Date: Sat, 12 Nov 2005 11:58:25 +0100

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
SCRIPT: gtk_server_connect 15696056 focus-out-event Trial
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

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

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


Other related posts: