Re: Problem with passing objects - GtkFixed
| From: | Markus Fischer | Date: | Sat, 15 Dec 2001 03:44:31 +0000 |
| Subject: | Re: Problem with passing objects - GtkFixed | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-864@lists.php.net to get a copy of this message | ||
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");
>
> $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.
--
Please always Cc to me when replying to me on the lists.