<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello list,<br>
<br>
I'm trying nitro 0.50 and it is working great. I didn't have the
problem i described in a precedent post anymore. The source is even
more readable and the syntax and the organization of nitro internals
are more powerful than ever. In other words, i have try it and i'm
convinced :)<br>
<br>
Also, i have found out some "minor" strangeness. I'm not quite used to
work with nitro so I hope they are only false positives or simply (and
that is what I think) i'm not in the pink ;)<br>
<br>
If I'm in the wrong mailing list to expose my issues and to ask for
help, just let me know where i have to post them and please, sorry for
the noise.<br>
<br>
1. Collisions<br>
<br>
For instance, if I name a class Menubar with a lowercase 'b' in the
skin.rb file and its associated render method contains a &lt;div
class="menubar"&gt;, the template &lt;Menubar&gt;&lt;/Menubar&gt; won't
render anymore until the class name is renamed MenuBar with a uppercase
'B'. Also, the page will be always well rendered if &lt;div
class="menubar"&gt; is declared inside the htmlx template file.<br>
<br>
To illustrate the issue:<br>
<br>
-declare a class Menubar or MenuBar in your skin.rb file: (of course,
the word menubar was used like an example)<br>
<br>
class Menu(Bb)ar &lt; Raw::Element<br>
&nbsp; def render<br>
&nbsp;&nbsp;&nbsp; %{&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class="menubar"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #{content}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;hr /&gt;<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp; end<br>
end<br>
<br>
-render the Menubar/MenuBar in the template like that,<br>
<br>
&lt;Page&gt;<br>
&nbsp; &lt;MenuBar&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;render href="menubar" /&gt;<br>
&nbsp; &lt;/MenuBar&gt;<br>
&lt;/Page&gt;<br>
<br>
The above will work, the following not:<br>
<br>
&lt;Page&gt;<br>
&nbsp; &lt;Menubar&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;render href="menubar" /&gt;<br>
&nbsp; &lt;/Menubar&gt;<br>
&lt;/Page&gt;<br>
<br>
Otherwise, if the style definition &lt;div class="..."&gt; is instead
declared in menubar.htmlx&nbsp; and not in the class itself:<br>
<br>
&lt;div class="menubar"&gt;<br>
&lt;ul&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;li class="browse_category"&gt;Choisissez une
Cat&eacute;gorie:&lt;/li&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &lt;?r @labels.each do |label| ?&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;?r if menuitem_active_on?(label.to_href) ?&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li class="active" id="current" title="Cette
page"&gt;#{label}&lt;/li&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;?r else ?&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href="#{label.to_href}"
accesskey="#{label.access_key}"
title="#{label.hint}"&gt;#{label}&lt;/a&gt;&lt;/li&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;?r end ?&gt;<br>
&nbsp; &lt;?r end ?&gt;
<br>
&lt;/ul&gt;<br>
&lt;/div&gt;<br>
&lt;hr /&gt;<br>
<br>
the page is then rendered correctly, whatever upper or lowercase 'b'
you will use in the class name.<br>
<br>
2. Question: how does #{content :method} really work ?<br>
<br>
That is the kind of stupid question i have but i really didn't get it
to work and didn't understand how it interacts with templates. Perhaps,
some better incantations could help me :)<br>
<br>
3. Annotation and elements<br>
<br>
I have tried to use an annotation to link a controller to an element.
In fact, :element_namespace gives me something related to
SomeClass::Controller:yy instead of Raw::Element::yy<br>
<br>
Also, i certainly misunderstood the annotation stuff ;)<br>
<br>
An example to illustrate the behavior:<br>
<br>
class Blog::Controller<br>
<br>
&nbsp; ann :self, :element_namespace =&gt; Post<br>
<br>
doesn't return an error and is linked to Blog::Controller::Post. I
think that is wrong ( it should be Raw::Element::Post)<br>
<br>
In opposite,<br>
<br>
ann :self, :element_namespace =&gt; BlogPage<br>
<br>
returns an exception,<br>
<br>
DEBUG: File './app/controller/blog.rb' is modified<br>
&nbsp;INFO: #&lt;NameError: uninitialized constant
Blog::Controller::BlogPage&gt;<br>
<br>
(The class BlogPage is declared in the app/skin/blogPage.rb file and
belongs to the Raw::Element superclass, so ann should link the class
Blog to Raw::Element::BlogPage instead)<br>
<br>
4. Just to mention it<br>
<br>
You need to press Ctrl-C twice to stop webrick<br>
<br>
&nbsp;INFO: Stoping Webrick adapter.<br>
&nbsp;INFO: Og uses the Mysql store.<br>
Database "aSite" dropped<br>
&nbsp;INFO: Dropped database 'aSite'<br>
&nbsp;INFO: Database 'aSite' not found!<br>
&nbsp;INFO: Created database 'aSite'<br>
DEBUG: Og manageable classes: []<br>
DEBUG: SELECT * FROM ogcategory<br>
ERROR: DB error Table 'aSite.ogcategory' doesn't exist, [SELECT * FROM
ogcategory]<br>
ERROR:
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/adapter/mysql.rb:122:in
`query'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/adapter/mysql.rb:122:in
`query_statement'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/store/sql.rb:554:in
`query'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/store/sql.rb:367:in
`find'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/model.rb:316:in
`all'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/manager.rb:118:in
`with_store'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../og/lib/og/model.rb:315:in
`all'<br>
./conf/debug.rb:37:in `init_og'<br>
./conf/debug.rb:22:in `setup_og'<br>
./conf/debug.rb:31:in `setup'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:152:in
`read_configuration_file'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:180:in
`configure'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:97:in
`start'<br>
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../nitro/lib/nitro.rb:73:in
`start'<br>
app.rb:31<br>
&nbsp;INFO: Starting Webrick adapter on 0.0.0.0:9000<br>
&nbsp;INFO: Press Ctrl-C to shutdown; Run with --help for options.<br>
&nbsp;INFO: Stoping Webrick adapter.<br>
<br>
<br>
5. That is a bit Greek (Chinese?) to me<br>
<br>
Some messages are really hard to understand and to debug and make the
source look fragile. That can be very frustrating especially if the
method are part of ruby language (e.g. each).<br>
<br>
DEBUG: Rendering '/blog/post'<br>
DEBUG: Compiling 'post' super-method<br>
DEBUG: Compiling 'post' view sub-method [format: html]<br>
--------<br>
undefined method `each' for nil:NilClass<br>
&nbsp; (eval):3:in `post___html___view'<br>
&nbsp;
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/controller/publishable.rb:36:in
`send'<br>
&nbsp;
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/controller/publishable.rb:36:in
`method_missing'<br>
<br>
6. Helper required<br>
<br>
When i need an helper for a class,<br>
<br>
include MenuHelper<br>
<br>
i have to declare explicitly the pathname for the helper in the file
were include is called,<br>
<br>
require "#{File.dirname(__FILE__)}/../helper/menu"<br>
<br>
Also, isn't app/helper the default directory for the helpers ?<br>
<br>
7. miscellaneous<br>
<br>
I often get the following message on the screen. What is wrong with the
arguments ? I don't use it.<br>
<br>
--------<br>
wrong number of arguments (1 for 0)<br>
&nbsp;
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/compiler.rb:65:in
`index'<br>
&nbsp;
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/compiler.rb:65:in
`send'<br>
&nbsp;
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/compiler.rb:65:in
`index___super'<br>
&nbsp;
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/controller/render.rb:79:in
`send'<br>
&nbsp;
/home/lilo/workspace/repo.nitroproject.org/script/lib/../../raw/lib/raw/controller/render.rb:79:in
`render'<br>
<br>
<br>
@George<br>
<br>
Here, we are far away from a heatwave . The local temperature is only
16&deg;C and it is raining. ;)<br>
<br>
<br>
Thx for you help,<br>
<br>
Jj<br>
<br>
<br>
<div class="moz-signature">-- <br>
<div class="moz-signature">
<meta content="text/html;" http-equiv="Content-Type">
<pre class="moz-signature" cols="72">
            |\      _,,,---,,_
      ZZZzz /,`.-'`'    -.  ;-;;,_
           |,4-  ) )-,_. ,\ (  `'-'
          '---''(_/--'  `-'\_)

<big><font face="Comics">
</font></big></pre>
</div>
</div>
</body>
</html>