Re: delete-event of GtkWidget

On Mon, 22 Jan 2007 09:13:03 +0100, "Dan H." <dunno stoptrick com>

Enrico TrÃger wrote:

Yes, I misused gtk_widget_hide and already fixed my code.


Obviously, I just wondered about the different behaviour of
different systems. I tested it also under Windows and there it is
like in Debian, the widget is still functional even though only by
accident or some other magic ;-).

That's the problem (or actually, the beauty) of Undefined Behaviour:
there's no need to even speculate on why things seem to work on one
system but not on others.
Ok convinced. I just had luck(that my app didn't crashed) and bad luck
(because I wasn't aware of the misuse).

BTW, why didn't your compiler warn you about the incompatible function
pointer argument in your callback? I always have ALL compiler warnings
on maximum bickering level to avoid this sort of problem.
Hm, I use -Wall for compiling with gcc. And this code doesn't produce a
g_signal_connect (dialog, "delete_event", G_CALLBACK(gtk_widget_hide),
And how could it? The gcc can't know which return type the definition
of the delete_event expects, can it?


Get my GPG key from

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]