Passing text from entry widgets from one f unc to another
| From: | PQ Administrator | Date: | Tue, 30 Oct 2001 01:43:02 +0000 |
| Subject: | Passing text from entry widgets from one f unc to another | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-484@lists.php.net to get a copy of this message | ||
Ive created an app which has a part with a clist. When you click on a record in that clist, a popup
form comes up displaying the member id and first and last name. When I make changes to the form, im
trying to make it so you click update, and whatever changes you make a written to a txt file. It
passes the member id from the clist to the form, but when i update, it writes the memid variable as
"Object" in the place where the member id should be!
Here is a code snippet:
function rec_selected($clist, $rowfill) {
$lname = $clist->get_text( $rowfill, 1 );
$fname = $clist->get_text( $rowfill, 2);
$memid = $clist->get_text( $rowfill, 0);
$gx3 = &new GladeXML('c:\phpgtk\test3\test3.glade');
$window3 = $gx3->get_widget('editrecWindow');
$label_recname = $gx3->get_widget('label20');
$label_recmemid = $gx3->get_widget('label21');
$bttn_cancel = $gx3->get_widget('button6');
$bttn_update = $gx3->get_widget('button4');
$fname_entry = $gx3->get_widget('entry19');
$lname_entry = $gx3->get_widget('entry20');
$minm_entry = $gx3->get_widget('entry21');
$label_recname->set_text("Record's Name: $lname, $fname");
$label_recmemid->set_text("MembID: $memid");
$memid = "$memid";
$bttn_cancel->connect('clicked', 'close_window');
$bttn_update->connect('clicked', 'do_rec_update', $memid); // this should
pass the memid variable that was grabbed the clist previously in this function
}
do_rec_update() starts like this:
function do_rec_update($memid) {
$txtfile = "c:\my documents/testing.dat";
$fp = @fopen($txtfile, "a+");
$datemade = date('Ymd');
$memberid = "$memid ";
$lastnm = " ";
$minm = " ";
$hpcode = "CALC"
TIA !!!
Troy McComas
Networks/System Admin. & Developer
PhysicianQuest.com
admin@physicianquest.com
Office - (818)550-8777 or (626)282-0288
Cell- (626)255-9833
<!-- -->
Powered by PhysicianQuest.com