Re: populateOptions() on a non-object
| From: | Justin Patrin | Date: | Wed, 29 Jun 2005 20:25:36 +0000 |
| Subject: | Re: populateOptions() on a non-object | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19832@lists.php.net to get a copy of this message | ||
On 6/29/05, PHPDiscuss - PHP Newsgroups and mailing lists <nyshab@gmail.com>
wrote:
> Hello, I was trying to get to work an example from
>
> http://www.akbkhome.com/svn/pear/DB_DataObject_FormBuilder/examples/
> I didn't found the author, but it seems a very good FormBuilder example of
> use. After setting the configuration options and point to
> http://localhost/example/index.php
I believe the author is Alan Knowles. I didn't know he had an example up.
>
> Index.php
> ...
> // Include the FormBuilder class definition
> require_once('DB/DataObject/FormBuilder.php');
> // Create the FormBuilder object BY REFERENCE and pass the DataObject
> $formBuilder =& new DB_DataObject_FormBuilder($obj);
> // Create the form, make sure to always make a REFERENCE to the
> FormBuilder object!
> $form =& $formBuilder->getForm($_SERVER['REQUEST_URI']); // This is the
> line
> ...
>
> I get this:
>
> Fatal error: Call to a member function populateOptions() on a non-object
> in c:\apache\php\pear\DB\DataObject\FormBuilder.php
>
A line # would be handy as well. It looks like you're using parts fo a
new release of FormBuilder and parts of an old release. Are you sure
your include_path set up right?
> Do I need to set up something else? I'll appreciate any comments or help
> on this.
>
> I'm using
> Microsoft Windows XP [Version 5.1.2600] (SP1)
> PHP 5.0.5-dev (cli) (built: Jun 23 2005 10:28:39)
> Apache/2.0.52 (Win32)
> DB_DataObject 1.7.14 stable
> DB_DataObject_FormBuilder 0.17.2 beta
> HTML_QuickForm 3.2.4pl1 stable
>
--
Justin Patrin