Re: [gtk-list] gtk--: connected methods with args
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] gtk--: connected methods with args
- Date: Sat, 29 Aug 1998 11:32:13 -0500 (CDT)
On Sat, 29 Aug 1998, Olof Oberg wrote:
> Is it possible to connect to a method that needs arguments, like:
>
> #define FOO 0
> #define BAR 1
> Gtk_Button *foo = new Gtk_Button("Foo");
> Gtk_Button *bar = new Gtk_Button("Bar");
> connect_to_method(foo->pressed, this, &button_pressed(FOO));
> connect_to_method(bar->pressed, this, &button_pressed(BAR));
^^^^^^ this
doesn't compile, I imagine.
Do this:
connect_to_method(bar->pressed, this, &button_pressed, 0);
That should work.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]