Re: [gtk-list] Re: closing dialog in Gtk--
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: closing dialog in Gtk--
- Date: 06 Mar 1998 02:35:07 +0200
robert havoc pennington <rhpennin@midway.uchicago.edu> writes:
> Hmm. Perhaps I'm doing something else wrong. Is this test case correct
> code?
>
> #include <gtk--.h>
>
> void close_callback ( Gtk_Dialog * gd )
> {
> gd->hide();
> delete gd;
> }
...
> connect ( b->clicked,
> close_callback,
> gd );
...
> I think I may be confused about connect() and all its combinations of
> possible arguments.
I think there's some problem with that format of connect(), I've got one
bug report about it that it messes up the value passed, but I had
no time to look into it yet :( Print the value of gd inside callback to be
sure. If it looks bad, then its the same bug. (it does crash at gd->hide()
call, doesnt it? -- again couldnt test that coz no X here :( )
Also, the close_callback should always be &close_callback in connect()
I think. Some compilers might not like giving a reference to a
function in that... maybe it even matches the function-object template
to that and not the function ptr one? :) (hmm, gotta see if the
last bug report about this has the same problem...yuup, exactly
same situation... I think I know where to find the problem ;)
--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]