Re: unassigned variables in docs
| From: | jcoder at insightbb dot com | Date: | Thu, 11 Nov 2004 17:20:06 +0000 |
| Subject: | Re: unassigned variables in docs | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-5225@lists.php.net to get a copy of this message | ||
Madeline,
Thank you. And yes the automatic parameters is what I didn't understand.
Again thank you
John
> John -
>
> I probably won't explain this much better than Nathan, but I'll try....
>
> The connect signal automatically sends two parameters from the list to any
> function - the list itself and the child item, in the case of a list, the
> row. Once it hits the functions, it can be called anything; for our
> purposes, we use $row. But it really doesn't matter. No matter what you
> do, the function will be handed those two parameters and they HAVE to be
> accounted for on that end.
>
> Frankly, we gave up a long time ago on trying to remember what connect
> handed off to what signal, for what event, for what widget, and switched to
> using 'connect_object', where there are no automatic handovers.
>
> I believe there is sample code somewhere on this list or in the distro that
> will allow you to determine the auto parms... I'll see if I can find our
> copy.
>
> Hope that helps.
>
> Madeleine D.
>
>
>
>
> At 02:28 PM 11/11/04 +0000, you wrote:
> >Nathan,
> >Thank you for your quick reply, But unfortunately it doesn't answer whatI
> >wanted. I'm trying to figure out where $item came from in the example
> given in
> >the docs. It's never assigned any value it just shows up in the function
> with no
> >mention that I can find in the docs.
> >I umderstand that it carries the selected value but i 'm having problems
> >understanding how the selected value got assigned to this particular
> variable.
> >or is it any variable that I choose or does it need to be "$item"
> >
> >Thanks John
> >
> >
> >
> >
> >> the $item is the selected item in the combo list.
> >> this object is passed to the function on signal 'select-child' =>
> >> $list->connect('select-child', 'print_this');
> >> So when this signal is emitted the function print_this will be called
> >> with the list object as first parameter and the selected child item as
> >> second parameter.
> >>
> >> You perhaps need to have a further look to GtkSignal to better
> >> understand how does this work:
> >> http://gtk.php.net/manual/en/signals.whatare.php
> >>
> >> best regards,
> >> nathan
> >>
> >>
> >> On Wed, 10 Nov 2004 22:20:56 -0500, John Coder <jcoder@insightbb.com>
> wrote:
> >> > Hi all,
> >> > I've been lurking for awhile and I came across something I
> >> > can't
> >> figure
> >> > out in the docs.
> >> > In
> >> >
>
> http://gtk.php.net/manual/en/gtk.gtkcombo.method.set_popdown_strings.php
>
> >> $item is used in the function print_this.But I can't find what it is
> assigned
> >> to. The only instances of it are in the function.
> >> > Could someone explain where it came from?
> >> >
> >> > Thanks
> >> > John Coder
> >> >
> >> > --
> >> > PHP-GTK General Mailing List (http://gtk.php.net/)
> >> > To unsubscribe, visit: I”\?Z1¼â{g
> >> > W_#fphttp://www.php.net/unsub.php
> >> >
> >> >
> >>
> >>
> >> --
> >>
> >> -- Malk0 --
> >> venez discuter php-gtk en francais ici
> >> http://mk0phpgtk.xgarreau.org
> >
> >--
> >PHP-GTK General Mailing List (http://gtk.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >