Re: re: Select box Equiv
| From: | rdp at talisman dot mv dot com | Date: | Tue, 08 Apr 2003 13:13:48 +0000 |
| Subject: | Re: re: Select box Equiv | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3224@lists.php.net to get a copy of this message | ||
On Mon, 7 Apr 2003, Madeleine D. wrote:
> This consolidates the errors - we now get 'Call to member function on a
> non-object', regardless of where the function is.
>
> How can we get the combo box to recognize the field names?
OK, I didn't see this yesterday but you're not calling the superclasses
constructor anywhere. You need something like:
Class ComboBox extends GtkCombo {
function ComboBox ($query,$txt,$lablew,$lableh,$fieldw,$fieldh,$function) {
$this->GtkCombo();
......
}
}
Other than that we'll need to see the code that calls this. Somewhere you
should be doing a:
$FirstCombo = &new ComboBox(....);
--rdp
>
> thanks
> Madeleine D.
>
>
> At 12:26 PM 4/7/2003 -0400, you wrote:
> >
> >You're calling a function within your class.
> >
> >So, instead of:
> >
> >$list->connect('select_child', 'set_ins_data');
> >
> >do this:
> >
> >$list->connect('select_child', array(&$this,'set_ins_data'));
> >
> >--rdp
> >
> >
> >On Mon, 7 Apr 2003, Madeleine D. wrote:
> >
> >> Reposting this item, since we didn't see any responses first time around.
> >>
> >> Madeleine D.
> >>
> >> ---------------------------------
> >>
> >>
> >> Still no luck on using the combo box to select and populate data.
> >>
> >> >Yes, the combo is the equivalent.
> >> >You have tho connect the "changed" (or similar, don't have a manual
> >> >here)
> >> >signal to your function to change the other widgets.
> >> >
> >>
> >> I set up the function against the 'select_child' signal to read our MySQL
> >> data with 'set_text' to populate the fields.
> >>
> >> But, if we put the function in the same file as the Combobox, it says it
> >> can't find the function ('Unable to call signal callback'). If we put
> >> it
> >> in another 'main functions' file, it can't find the fields. We get a
> >> 'Call
> >> to member function on a non-object' at the first field reference.
> >>
> >> Sorry, but I can't see what's happening here.
> >>
> >> thanks in advance.
> >>
> >> Madeleine D.
> >>
> >
> >Rich Payne
> >http://talisman.mv.com
> >rdp at talisman dot mv dot com
> >
> >
> >
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Rich Payne
http://talisman.mv.com
rdp at talisman dot mv dot com