Re: [sprog-users] Re: Sprog::Gear::ReadExcel.pm Code Review
Status: Alpha
Brought to you by:
grantm
From: Grant M. <gr...@mc...> - 2005-06-25 20:20:13
|
On Sat, 2005-06-25 at 12:35 -0400, Marc Slagle wrote: > Grant McLean wrote: > >* The file_start and file_end events both send an argument of undef. > > It really ought to be the filename. > > Next version will do this. Actually if you switch to not reading from a file then you can leave out the file_start, file_end stuff altogether - it will be handled automatically by the ReadFile gear. > >* I'd also suggest that your gear shouldn't read from a file at all. > > > I will update the code to handle input this way. I've just checked in to CVS a SlurpFile mixin module which handles the details of file_start/end so all your gear needs to do is: use base qw( Sprog::Gear::SlurpFile Sprog::Gear ); sub file_data { my($self, $data, $filename) = @_; # do stuff with $data and call $self->msg_out } Expect a release in a day or two. > I have one question about the XML dialogs. It my be > documented, and if it is tell me to RTFM. I would like to have the > system pop up the dialog box with a pulldown list of the sheets on the > excel file if they have not selected one. Hmm that's tricky from many angles. * I haven't implemented drop downs in properties dialogs yet because I haven't needed them (yet). * You can't do it in a normal properties dialog anyway because the ParseExcel gear won't know the filename until run-time. * When I implement the ReadFiles gear, someone could drag-n-drop multiple files onto a machine. * In theory, you could pop-up a dialog at run-time, but you'd need to implement that in a custom gear view class. None of the existing gears use dialogs at run time. > After this excel > module is put to rest I plan on moving into an XSLT gear, since I > already have a need for that. That one is on my list too. Not that I'd discourage you from taking it on. > I'm also considering touching MySQL data > input/output gears, since being able to shuffle spreadsheets on my > desktop and either read or write records to my database would also make > life a lot easier. Yes, DBI connectivity is a much needed feature. See my other email for a workaround you might be able to use now. Cheers Grant |