Re: [PHP-GTK] GtkCombo
[email protected] (Andrei Zmievski) Sat, 4 Aug 2001 10:15:53 -0500
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 04 Aug 2001, Lorrie Cooke wrote:
> HI,
>
> Thanks for info,
>
> That helped get the selection, I am also trying to send the gtkDialog to
> the function(so i can destroy the dialog window) like this:
>
> $list->connect('select-child', select_db, $listed,$query);
>
> (where $query= &new GtkDialog)
>
> however in the called function $query returns the last item in the
> dropbox array..
>
> function select_db($list,$listed,$query){
> global $dropbox;
> $number = $list->child_position($listed);
> echo "$dropbox[$number] - $query\n";
> }
One should keep in mind that the callback function may receive different
number of arguments depending on the signal _in addition_ to the custom
parameters that you pass it. So 'select-child' callback actually
receives both GtkList _and_ the selected child widget and the rest of
the parameters are the custom ones.
-Andrei
* 2 + 2 = 5 for extremely large values of 2. *