Re: re: Select box Equiv
| From: | Madeleine D. | Date: | Thu, 10 Apr 2003 16:57:26 +0000 |
| Subject: | Re: re: Select box Equiv | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3230@lists.php.net to get a copy of this message | ||
Rdp -
Thanks for your feedback.
The problem was not in the GtkCombo, but in getting the data inside the
other fields. I have solved the issue enough to keep going. Since we're
under a time crunch, I couldn't spend a lot of time figuring out the why's
and wherefore's.
What I did was to set the fields inside an array, as in
'$insFields["ins_entry_name"]', gave them entry properties, and then
declared $insFields as a global inside the set_ins_data function. I was
then able to display the data back to the fields. Have no idea why a
global of the indiv fields didn't work.
We're still having some problems with the focus on the GtkCombo; i.e., it
won't let us use the keyboard to move around inside it using arrows,
spacebar, etc. But we will have to save that for another day.
thanks again,
Madeleine D.
At 09:13 AM 4/8/2003 -0400, rdp@talisman.mv.com wrote:
>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
>
>
>--
>PHP-GTK General Mailing List (http://gtk.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>