<br><div><span class="gmail_quote">On 7/5/06, <b class="gmail_sendername"><a href="mailto:hkclark@gmail.com">hkclark@gmail.com</a></b> <<a href="mailto:hkclark@gmail.com">hkclark@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
><br>> Would it be a good idea to have the helper for <a href="http://Root.pm">Root.pm</a> put in the<br>> commend for the end action so that it's already using RenderView?<br>><br>> Kennedy<br>><br><br>
Two update:<br><br>1) I have not heard back from anyone on this... my guess is if we ship<br>5.7000 with the tutorial "as is" we will regret it :-) If there is<br>anyone familiar with RenderView out there, please review my changes.
</blockquote><div><br>Sorry, I've been kinda busy with my bathroom and stuff, back now. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2) Re my previous note about the helper: it looks like I'm using an<br>old version of Catalyst::Helper -- it looks like the version in trunk<br>does what I was talking about.</blockquote><div><br>Yeah. I am kinda worried that
catalyst.pl does not in fact detect that people have an old Catalyst::Helper, and thus won't be notified about needing to install the Catalyst-Devel package :( <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
3) After playing with RenderView a little more, I'm guessing that the<br>"sub end : ActionClass('RenderView')" should NOT include the<br>"$c->forward('MyApp::View::TT') unless $c->res->body;" line as I show
<br>in the links to the stuff I submitted to subversion earlier today. If<br>I leave that line in, it pukes with a "Coldn't render template "file<br>error - books/list: not found"" error message.</blockquote>
<div><br>Right, as done by the default helper, your renderview line should look like this:<br><br>sub end : ActionClass('RenderView') {}<br><br>and you can extend it like this:<br><br>sub end : ActionClass('RenderView') {
<br> my ($self,$c) = @_;<br> .... # do stuff here<br>} <br>Where the view will be rendered according to the same logic as DefaultEnd after the do stuff here bit. If you need to do stuff after rendering the view, you should do something like this:
<br><br>sub render : ActionClass('RenderView') {}<br><br>sub end : Private {<br> my ($self,$c) = @_;<br> $c->forward('render');<br> ... # do stuff here<br>}<br><br><br>Hope this clears up some of your worries.
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks,<br>Kennedy<br><br>PS -- Looks like there is a typo in the "Coldn't render..." -- might
<br>be worth fixing for 5.7000.<br><br>_______________________________________________<br>Catalyst-dev mailing list<br><a href="mailto:Catalyst-dev@lists.rawmode.org">Catalyst-dev@lists.rawmode.org</a><br><a href="http://lists.rawmode.org/mailman/listinfo/catalyst-dev">
http://lists.rawmode.org/mailman/listinfo/catalyst-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>With regards<br>Marcus Ramberg