That's a good point about the admin page not looking good without the stylesheets, we should account for the fact that not everyone is going to run the generator. Probably include a different stylesheet or embed some minor style.
<br><br>I can take a look at the template scan, I have mainly tested on files that came out of the generator so maybe on something simpler that doesn't have as many mv:generates, maybe we are getting into an empty list situation that we weren't with the generator created files. 
<br><br><br><br><div><span class="gmail_quote">On 6/12/06, <b class="gmail_sendername">Deb Lewis</b> &lt;<a href="mailto:djlewis@acm.org">djlewis@acm.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Configuration: new, empty rails app w/ masterview installed in<br>vendor/plugins from my working copy, with new initializer hooked up, but no<br>changes to parser.rb or analyzer.rb from current trunk.&nbsp;&nbsp;Three lines changed
<br>in template_spec.rb to convert old MasterView::TemplateSrcRelativePath const<br>refs and hardwired 'app/views' to new TemplateSrcDirPath constant.<br><br>Create a single very simple template in app/masterview templates dir and
<br>verify that MV detects and parses it into app/views.&nbsp;&nbsp;Attached.<br><br>Go to masterview Admin controller -&gt; list page does a TemplateSpec.scan on<br>the templates src dir, breaks in Analyzer.end_element with nil value for
<br>stack.last at line 196 (if @depth == @stack.last.depth)<br><br>It's dying on the &lt;title&gt; element the document &lt;head&gt;, according to trace<br>dumps that I added.<br><br>Not going to pursue this further right this instant, but this doesn't look
<br>like a Win32 platform issue.&nbsp;&nbsp;Probably just needs extra stack.empty? check<br>per below (just adding that did fix this simple case).&nbsp;&nbsp;Anyway, explains why<br>the admin controller breaks when I try to run it, my templates all have
<br>&lt;title&gt; elements in their headers.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;if ! @stack.empty? &amp;&amp; @depth == @stack.last.depth<br><br>p.s. if you activate the admin controller in a new empty rails app it's<br>really bogus looking - assumes stylesheets that aren't there.&nbsp;&nbsp;I think these
<br>are guys that get dropped in from running your other generator, which at<br>this point I haven't done in this new app and it's a legit use case that one<br>might not do so.&nbsp;&nbsp;A to-do for the cleanup list, not critical for the moment.
<br><br>~ Deb<br><br>MasterView::Analyzer.start_document<br><br>MasterView::Analyzer.start_element<br>...uri: <a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a><br>...&lt;html&gt;<br>...attributes: lang, xml:lang, xmlns
<br>...@depth=0<br>...@stack=[0 entries] on entry<br>...@stack=[0 entries] after processing entry<br><br>MasterView::Analyzer.start_element<br>...&lt;head&gt;<br>...@depth=1<br>...@stack=[0 entries] on entry<br>...@stack=[0 entries] after processing entry
<br><br>MasterView::Analyzer.start_element<br>...&lt;title&gt;<br>...@depth=2<br>...@stack=[0 entries] on entry<br>...@stack=[0 entries] after processing entry<br><br>MasterView::Analyzer.end_element<br>...&lt;/title&gt;<br>
...qname=title<br>...@stack=[0 entries] on entry<br><br>ERROR:<br>You have a nil object when you didn't expect it!<br>The error occured while evaluating nil.depth<br><br><br>_______________________________________________
<br>Masterview-devel mailing list<br><a href="mailto:Masterview-devel@rubyforge.org">Masterview-devel@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/masterview-devel">http://rubyforge.org/mailman/listinfo/masterview-devel
</a><br><br><br></blockquote></div><br>