Problems whith Structures_DataGrid 0.6.0

From: Date: Fri, 24 Dec 2004 01:21:27 +0000
Subject: Problems whith Structures_DataGrid 0.6.0
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16444@lists.php.net to get a copy of this message
Hi all, I have been using Structures_DataGrid for some projects, with the old version, with DataObjects datasources, using my own bind() method. New version's approach of drivers for datasources seems cool, so i tried to migrate projects to 0.6.0. The problem is that i haven't been able to get it running, even with the basic examples which comes whith the package. I always get an empty table rendered. When, as an example, i create a datagrid $ds and bind with the basic array $rs which comes whith the example, this whorks: echo $dg->_dataSource->dump(); It dumps the table, but $dg->render(); does not work. When trying to guess what's going on, i've seen that the problem seems that fetchDataSource() method called from getTable() (inside the HTML_Table renderer) finds an empty "_datasource" property. I mean: $dg->_datasource contains a valid structures_datagrid_datasource_array Object, but $dg->renderer->_dg->_datasource is null, and also from inside the renderer, (the property _dg->_datasource is null), thus when _$dg->fetchDataSource() is called from inside the renderer (as a result of $dg->render() ) returns no valid recordSet or columnSet. if called from the main test program, $dg->fetchDataSource returns recordset and columnSet correctly. Is this normal and i'm doing any other thing wrong, or there could be a problem whith the renderer's "_dg" reference? I just now have find that doing: $dg = new Structures_DataGrid(20); $dg->renderer->_dg = &$dg; it seems to work correctly, but does not work without the second line... why could it be? Thank you very much, and sorry for my bad "spanglish" ;-) PS: I'm using php 4.3.9, after downgrading from 4.3.10 due to the overload() bug.

« previous php.pear.general (#16444) next »