Re: [gtk-list] Re: Force refresh/exposure
- From: Havoc Pennington <hp redhat com>
- To: gtk-list redhat com
- cc: discoman club-internet fr
- Subject: Re: [gtk-list] Re: Force refresh/exposure
- Date: Mon, 19 Jul 1999 22:11:39 -0700 (PDT)
On Tue, 20 Jul 1999, Erik Mouw wrote:
> > - and to force the exposure by a
> > gtk_signal_emit_by_name(GTK_OBJECT(label), "expose_event");
> > but it does a segmentation fault.
>
> Sounds like a wild/dangling pointer. Have you tried running your program
> in a debugger? Compile and link with the "-g" option and run your program
> in gdb. When you get a segfault, simply type "where" and the debugger will
> show you the point where your program crashed.
>
You should just delete this line of code, but for education purposes, the
problem is that expose events take an argument and have a return value, so
if you were to emit one this way you'd have to put those in the arg list,
like:
gtk_signal_emit_by_name(widget, "expose_event",
&an_expose_event_struct, &int_return_value);
but, you shouldn't go around emitting random events manually; you have to
use the API to emit them, in this case gtk_widget_event().
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]