Re: Problem with passing objects - GtkFixed
| From: | root | Date: | Sat, 15 Dec 2001 05:04:54 +0000 |
| Subject: | Re: Problem with passing objects - GtkFixed | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-865@lists.php.net to get a copy of this message | ||
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.
>
>