[Nitro] Writing a XUL app
Chris Farmiloe
chris.farmiloe at farmiloe.com
Sun Sep 25 09:45:13 EDT 2005
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
>
>
More information about the Nitro-general
mailing list