gtk-- delete/destroy confusion

I set myself a project of using gtk-- to learn C++ and it's going
pretty well, all things considered (I've done some Java prorgamming,
and debugged some C++ programs, so it's not quite all that adventurous
:-) I've got some problems left in my test program.

I have some classes derived from Gtk_Window which use malloc and new
in the constructors, and maintain linked lists.  I need my own
destructor to maintain these items.

1.  Should the destroy function explicitly invoke delete on itself?
    It doesn't seem to be called naturally by the destroy function.

2.  Should destroy call delete, or the other way round?

3.  I translated this program from a C/gtk+ version, and can't find an
    equivalent to the EventBox's "button_press_event".

4.  I tried to follow the example programs use of the delete_event,
    but I get these error messages:

/usr/local/include/gtk--sigslot.h: In method `int Slot1<int,cds_editRow,_GdkEventAny *>::call(struct _GdkEventAny *)':
/usr/local/include/gtk--sigslot.h:110: warning: control reaches end of non-void function `Slot1<int,cds_editRow,_GdkEventAny *>::call(_GdkEventAny *)'
/usr/local/include/gtk--sigslot.h: In function `static int Slot1<int,cds_editRow,_GdkEventAny *>::callback(struct _GtkWidget *, struct _GdkEventAny *, class Slot1<int,cds_editRow,_GdkEventAny *> *)':
/usr/local/include/gtk--sigslot.h:110: warning: control reaches end of non-void function `Slot1<int,cds_editRow,_GdkEventAny *>::callback(_GtkWidget *, _GdkEventAny *, Slot1<int,cds_editRow,_GdkEventAny *> *)'

Here's the function from the class:

  int		deleteCallback (GdkEventAny *);

and the function itself:

cds_editRow::deleteCallback (GdkEventAny *)
  quitCallback ();
  return (TRUE);

Everything compiles fine if the connect_to_signal is commented out,
leaving deleteCallback in place.

Thanks in advance for any help.

            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon /
  PGP = 91 B3 94 7C E9 E8 76 2D   E1 63 51 AA A0 48 89 2F  ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

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