Re: DB_DataObject and Structures_DataGrid integration

From: Date: Fri, 13 Aug 2004 14:27:31 +0000
Subject: Re: DB_DataObject and Structures_DataGrid integration
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-32619@lists.php.net to get a copy of this message
Olivier Guilyardi wrote:
Personnally, I think the .NET way to attach event handlers is very interesting. As I proposed previously this could be done with : $column = new Structures_DataGrid_Column_Link("Edit"); $column->attachEventHandler("edit_callback_function"); $datagrid->addColumn($column);
Why attachEventHandler? This method name makes sense only if there are in fact multiple events that can be fired by a column class. What events would this be? When would they be fired? How are they being triggered? If it's just for formatting of the column's content, why not call it "formatCallback" or something like that? Having "event" in the name is a bit misleading, IMHO, as it suggests an observer mechanism in place. And for those, we'll (hopefully) soon have official PEAR naming standards :-) (Btw. a general all-purpose event handling package will soon be proposed. Stay tuned.) CU Markus

« previous php.pear.dev (#32619) next »