[Nitro] Writing a XUL app

zimba zimba.tm at gmail.com
Sun Sep 25 13:22:26 EDT 2005


Thanks for your answer, this is already a good start.

What I ultimately am looking for, is a way to write .xul files that can 
include ruby, and can be served directly.
The same way as the .xhtml files.

It would also be nice if I can optionnaly use controller method when I 
need them. But it's not that necessary because most of the time, the 
datas will be fetches asyncronously anyway.


Chris Farmiloe wrote:

>although I'm not sure what your doing with the xul stuff I assume
>it's all just XML output so just set up a controller like
>
>XULController < Nitro::Controller
>   def some_control
>     response.content_type = "application/vnd.mozilla.xul+xml"
>     build do
>         vbox(:flex => "3") {
>           label(:class => "header")
>         }
>       end
>   end
>
>   def another_control
>     response.content_type = "application/vnd.mozilla.xul+xml"
>     @out << %|  <vbox flex="3"><label class="header" /></vbox> |
>   end
>end
>
>(both would do the same)
>
>if you wanted to be more MVC and/or had alot of business logic
>to do then you should probly split it up using templates.
>
>
>On Sep 25, 2005, at 14:09, zimba wrote:
>
>
>  
>
>>Hello,
>>
>>Is it possible to write XUL apps with nitro ?
>>I guess yes, but I'd like to keep it simple and have something like  
>>the
>>SimpleController that understands .xul files instead of .xhtml ones.
>>Also the controller have to send the HTTP header :
>>Content-type: application/vnd.mozilla.xul+xml
>>
>>I wish I could do this myself, but the wiki is gone. I hope I can
>>contribute in the future.
>>
>>
>>Cheers,
>>... zimba
>>_______________________________________________
>>Nitro-general mailing list
>>Nitro-general at rubyforge.org
>>http://rubyforge.org/mailman/listinfo/nitro-general
>>
>>
>>    
>>
>
>
>_______________________________________________
>Nitro-general mailing list
>Nitro-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/nitro-general
>
>  
>




More information about the Nitro-general mailing list