Re: Problem with passing objects - GtkFixed
| From: | Troy McComas | Date: | Mon, 17 Dec 2001 21:31:26 +0000 |
| Subject: | Re: Problem with passing objects - GtkFixed | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-868@lists.php.net to get a copy of this message | ||
$fileCompareRecEdt is a glade file... $fxdFormBoxes is a GtkFixed
container made in Glade... then called from my script.
Now I can see where the confusion came in...
On Sat, 2001-12-15 at 02:07, Markus Fischer wrote:
> You haven't told use where $fileCompareRecEdt come from, what
> for an object or variable it is and what $fxdFormBoxes
> contains.
>
>
> "minus the non-constructive criticism."
>
> You're throwing not even half of what gives you gray hairs to
> use for feeding and expect us to solve this? Come on ;)
>
> On Sat, Dec 15, 2001 at 07:44:03AM -0000, Steph wrote :
> > 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
> > >
> >
> >
> > --
> > 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
>
> --
> Please always Cc to me when replying to me on the lists.
>
> --
> 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