Re: cvs: pear /Structures_DataGrid DataGrid.php

From: Date: Mon, 27 Feb 2006 20:39:42 +0000
Subject: Re: cvs: pear /Structures_DataGrid DataGrid.php
References: 1 2  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38734@lists.php.net to get a copy of this message
Hi, Justin Patrin wrote: > :-( *That's* going to break all of my scripts.... (AFAIKnew ->renderer > was the preferred/documented/only way to access the renderer....at > least when I first started using SDG) I personally always used getRenderer(). The doc mentionned both ways at various places IIRC. Is this really a major break to you ? You just need to drop some $renderer =& $datagrid->getRenderer() and do a s/datagrid->renderer/renderer/ > Sorry, I don't know of any new options.... In fact, I see no option > which is the equivalent of setTableAttribute currently..... Indeed there is no equivalent option. Let's look at how this setTableAttribute() method does its job : $this->_container->_attributes[$attr] = $value; I don't see how dirtier and more BC-prone this could get. An option wouldn't solve it. But there are equivalent options for most of the other set*() methods. Now, how to set a table attribute ? Here we go... $table = new HTMLTable(array('border' => '1')); $datagrid->fill($table); Isn't this better ? Not to mention all sort of customization you can do before passing your $table to fill(). With this new design, we just don't need to decorate all of the HTMLTable methods, which is pointless, and can be impossible as with the table attributes. Anyway, dont worry, we're not likely to remove this setTableAttribute() method. It will just not appear anymore in the docs. Regards, -- og

« previous php.pear.cvs (#38734) next »