Make sure that when you copy and paste mason examples, any lines that start with '%' have the '%' in the first column of the line. Otherwise, the code won't be parsed properly.<br><br>EdF<br><br><div><span class="gmail_quote">
On 8/4/06, <b class="gmail_sendername">Malte Ubl</b> <<a href="mailto:malte.ubl@gmail.com">malte.ubl@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;">
Hey,<br><br>I just installed Jifty on MacOS X 10.4 and started doing the tutorial<br>application.<br><br>Entering posts via the administration interface works, however when I<br>copy the code from the tutorial to view the posts I get a mason error.
<br>I am new to mason (long time template toolkit fan), so it is hard to<br>say why this is failing:<br><br>Error:<br>Global symbol "$post" requires explicit package name at<br>/Users/malte/jifty/MyWeblog/share/web/templates/index.html line 10.
<br>Global symbol "$post" requires explicit package name at<br>/Users/malte/jifty/MyWeblog/share/web/templates/index.html line 11.<br><br><br>Code:<br><%init><br> my $posts = MyWeblog::Model::PostCollection->new();
<br> $posts->unlimit();<br> </%init><br><br> <&|/_elements/wrapper, title =><br>Jifty->config->framework('ApplicationName') &><br> <dl><br> % while (my $post = $posts->next) {
<br> <dt><%$post->title%></dt><br> <dd><%$post->body%></dd><br> % }<br> </dl><br> </&><br><br>When I try out the AJAX-driven variant I get the same error within the
<br>page_of_posts fragment.<br><br>The whole thing seems to be a scoping problem. When I define $post<br>within the init-block at the top the error goes away but $post is<br>empty when the method title ist called, so I guess that the my $post
<br>definition is somehow not visible on the next line.<br><br>I'm probably missing something really obvious, but thanks for your<br>help and great work anyway!<br><br>malte<br>_______________________________________________
<br>jifty-devel mailing list<br><a href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a><br><a href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel">http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
</a><br></blockquote></div><br>