RE: [PHP-GTK] GtkCombo

From: Date: Tue, 08 Jun 2004 08:18:08 +0000
Subject: RE: [PHP-GTK] GtkCombo
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4635@lists.php.net to get a copy of this message
Yep, this cracked it... function get_device_name() { $comboEntry = $GLOBALS['combo']->entry; // access the selected list item $device_name = $comboEntry->get_text(); // set device_name to selection //var_dump($device_name); return $device_name; } function send_job() { $filename = $GLOBALS['nx_outbox'].get_device_name().'_'. '34131341'.'.J'; echo $filename; } -----Original Message----- From: Rhys Campbell [mailto:rhys.campbell@da-systems.co.uk] Sent: 08 June 2004 09:01 To: PHP-GTK Mailing List (E-mail) Subject: RE: [PHP-GTK] GtkCombo set_popdown_strings() populates the combo box fine. I've checked the name of the widget in the xml file and that's fine. Just used var_dump($device_name) in the get_device_name() function and it it does return the selected value. So I guess the problem must lie in my send_job() function. Can't see what as it's as simple as... Think I will have a go at returning \ passing the variable instead. Thanks. -----Original Message----- From: Steph [mailto:steph@zend.com] Sent: 07 June 2004 21:32 To: Ciprian Popovici; php-gtk-general@lists.php.net Subject: RE: [PHP-GTK] GtkCombo I thought 'Set_Popdown_Strings()' might be a problem too, but also thought the problem described was about selection after the list had been populated.. If the list isn't being populated, the method call should be set_popdown_strings(). If the list _is_ being populated, I remain clueless :I sorry. > -----Original Message----- > From: Ciprian Popovici [mailto:ciprian@zuavra.net] > Sent: 07 June 2004 19:02 > To: php-gtk-general@lists.php.net > Subject: Re: [PHP-GTK] GtkCombo > > > On Mon, 7 Jun 2004 14:55:56 +0100 "Rhys Campbell" > <rhys.campbell@da-systems.co.uk> wrote: > > Having a little problem with a combo box. I can't seem to get > the selected > > value. I've used this before but can't see why it's not working > now. I used > > I'm doing pretty much the same thing myself and I can't see why your code > isn't working. Perhaps it's not called "combo" in Glade, so get_widget > returns nothing? But I think you'd get some errors in that case. > > What's that Set_Popdown_Strings() member you're using for $combo? > Is it from > GTK or did you make it yourself? If you made it, perhaps the problem lies > there. > > Try to examine $combo's contents in the main body of the script, see if > actually contains what it's supposed to. You can also var_dump() $entry in > that function, see what's actually in there. > > -- > Ciprian Popovici > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.gtk.general (#4635) next »