Re: [PHPLIB] subclassing Table From: xendra (xendra <email protected>)
Date: 12/03/99

That's because some of those functions were stand alone in a file called
UTIL.INC. However, it was deemed this utility file was unnecessary because
the only source using it was TABLE.INC. Therefore, the code was moved to
TABLE.INC, and added to the class, but the references were not changed.

I'd change it, but my CVS program broke and I cannot find another one to log
into the system.

As for your second question, here is your original code:

$this->$table_row_open($row, $d, $class); # I GET ERROR HERE !!!

Change it to:

$this->table_row_open($row, $d, $class);

You'll notice the dollar sign in front of table_row_open is removed.

Jeff

----- Original Message -----
From: "Valery Zamarayev" <qd <email protected>>
To: <phplib <email protected>>
Sent: Wednesday, December 01, 1999 3:43 AM
Subject: [PHPLIB] subclassing Table

> Hi !
>
> PHPLib-7.2 + PHP-3.0.13-dev + Apache_1.3.9 + MySQL-3.22.27 on
FreeBSD-2.2.8
>
> 1. I tried to set $debug=1 in my script and got errors:
> Call to unsupported or undefined function print_array() in ...
> It seems the guys forgot to write $this->print_array(...) insted of
> simply print_array(...) in table.inc at lines 806 and 849.
>
> 2. What's wrong with this code:
>
> class Table_Sections extends Table {
> function table_row($row, $row_key, $data, $class="") {
> global $sess;
> $cell = 0;
> $d = $this->select_colnames($data);
> $this->$table_row_open($row, $d, $class); # I GET ERROR HERE !!!
> # I customize output of cell content
> printf (" <td%s><a href=\"%s\">%s</a></td>\n",
> $class?" class=$class":"",
$sess->self_url().$sess->add_query(
> array("section_id"=>$data["section_id"])),
> $data["session_name"] );
> $this->$table_row_close();
> }
> }
>
> I get the following:
>
> Fatal error: Call to unsupported or undefined function () in
> ^^^^
> /var/www/site/data/operator/catalog.php3 on line 10
>
> line 10 is '$this->$table_row_open(.....);'
> what is 'undefined function ()' ? where is the bug ?
>
> Thanks in advance to all who can point me in the right direction.
>
> --
> Sincerely etc. Valery Zamarayev
> http://www.sea.com.ua
> -
> PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
> To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
> the body, not the subject, of your message.
>
>

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.