Re: html_tables question - fixed
| From: | Ken Restivo | Date: | Mon, 01 Nov 2004 01:15:10 +0000 |
| Subject: | Re: html_tables question - fixed | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15254@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, Oct 31, 2004 at 11:04:13AM -0500, leegold wrote:
>
> > Will anyone please help???
>
> $table -> setRowAttributes(0, $hrAttrs, true);
>
> If i take out the "true" ie.
> $table -> setRowAttributes(0, $hrAttrs);
>
> The extra cell goes away. I did try to RTFM, but discovered this by
> "shotgunning" here and there. I wish the documentation was less "unix
> manual page like" and more conversational w/more examples. But anyway
> it's fixed;P Now I have to figured out why it did that so I can learn
> how it works.
>
The code to setRowAttributes() offers some clues. If $inTR is set (your "true" argument),
it seems to apply the attributes to each cell, using the updateCellAttributes() function. If $inTR
is false, then it calls _adjustEnds() and _updateAttrArray() on the cell. I have no idea why,
it's not documented and it's unobvious to me. I suppose if I read through the entire
module, it'd make more sense, but I'm a lousy programmer and am very slow at reading and
understanding code.
My best guess is that _adjustEnds() has some unexpected side effect that adds an extra cell. Maybe
you found a real bug. If you can replicate it with a a couple-line test-case, and submit a bug
report, perhaps someone more clueful than me could address it.
- -ken
- --
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBhY4ee8HF+6xeOIcRAtBKAJ4hgx65vv15sC+upQexeAYuJxb1mwCg5GCz
ZTmqr5HWSCXD0cyPb6f1hlg=
=7dIi
-----END PGP SIGNATURE-----