Re: Problem with passing objects - GtkFixed

From: Date: Sat, 15 Dec 2001 07:44:03 +0000
Subject: Re: Problem with passing objects - GtkFixed
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-866@lists.php.net to get a copy of this message
My money's on Markus ... :) get_widget() is an itemfactory method (only) requesting the path to a widget. You don't give enough information to make it clear whether you're actually getting some kind of returned widget at this point ... you shouldn't be ... ! ... so it's not straightforward to diagnose, since you never refer to that widget again until you've passed it to the function. Can you confirm that you're able to show() the fixed prior to passing it? Be nice - Steph ----- Original Message ----- From: "root" <root@physicianquest.com> To: "Markus Fischer" <mfischer@guru.josefine.at> Cc: <php-gtk-general@lists.php.net> Sent: Saturday, December 15, 2001 5:04 AM Subject: Re: [PHP-GTK] Problem with passing objects - GtkFixed > > > Sorry for not including the "full" error message. However, I limit the > script to only what it pretains to because this is where the problem > occurs. So in actuality, it wasnt a partial "script", but rather a partial > error mesg. > > Ive noted what line it errors out on... > > Such a lively crew on this list. Thanks to those who can actually answer > my question, minus the non-constructive criticism. > > On Sat, 15 Dec 2001, Markus Fischer wrote: > > > On Fri, Dec 14, 2001 at 03:01:59PM -0800, root wrote : > > > Im having issues with passing GtkFixed (named fxdFormBoxes) to another > > > function... the code is as follows: > > > > > > > > > function frmLoadMembModifiers($list, $listed, $fxdFormBoxes) { > > > > > > $number = $list->child_position($listed); > > > > > > if($number == "0") { > > > > > > $labeltest = &new GtkLabel("This is a test"); > > > > > Errors out @ the following line... > > > > $fxdFormBoxes->put($labeltest, 50, 10); > > > > > > $labeltest->show(); > > > > > > } > > > > > > } // End func(frmLoadMembModifiers) > > > > > > > > > $fxdFormBoxes = $fileCompareRecEdt->get_widget('fxdFormBoxes'); > > > > > > $combo = &new GtkCombo(); > > > > > > $list = $combo->list; > > > > > > $items = array("Last Name", "First Name", "MI", > > > "Date of Birth", "SSN"); > > > > > > $list_items = array(); > > > > > > foreach($items as $listed) { > > > > > > $show_items = $list_items[] = &new GtkListItem($listed); > > > > > > $show_items->show(); > > > > > > } > > > > > > $list->append_items($list_items); > > > > > > $list->set_selection_mode(GTK_SELECTION_SINGLE); > > > > > > $list->connect('select-child', 'frmLoadMembModifiers', > > > $listed, > > > $fxdFormBoxes); > > > > > > $fxdSelFldChng->put($combo, 100, 10); > > > > > > $combo->show(); > > > > > > > > > // End code > > > > > > It looks right, havent had a problem like this before but it returns the > > > dreaded "Call to a member function on a non- object" mesg. > > > > > > Thanks in advance guys. > > > > > > Andrei... Read PHP Dev Cookbook... Excellent book, good job. > > > > Heh. Although I also think Andrei rocks, I bet 100 bucks he's > > no clairvoyant and you might tell us the > full < error > > message (especially the _line_ number _where_ it happens). > > You might also want to try var_dump($var); to see why it's > > not an object. > > > > If I send you parts of a script and tell you only "it doesn't > > work" you won't be pleased either. > > > > > > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, e-mail: php-gtk-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-gtk-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

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