Re: [gtk-list] Gtk--: how to disconnect (Button) objects
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Gtk--: how to disconnect (Button) objects
- Date: 22 Aug 1998 21:29:49 +0300
Robert_Gasch@peoplesoft.com writes:
> I'm doing a connect_to_method onto a button (Gtk+1.0.5, Gtk--0.9.11)
> which works just fine. The problem I have is how to disconnect the
> button at a later stage.
>
> Connection *connect;
> Gtk_Button button;
>
> connect_to_method (button.clicked, this, &callbackMethod);
>
> ... snip ...
>
> // 1st try
> //connect = (Connection *)(button.clicked) // doesn't compile
It should be:
Connection c;
c=connect_to_method(button.clicked, this, &callbackMethod);
...
c.disconnect();
usually you want to keep the c variable stored inside the object which
creates the connection (and also later disconnects th connection..).
--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]