[Nitro] how to initialize @color and make it visible into the template?
George Moschovitis
george.moschovitis at gmail.com
Tue Jul 10 02:39:49 EDT 2007
the element will generate this code:
<div style="color: #{colors[rand(colors.size)]}">...</div>
which does what you want.
-g.
On 7/10/07, Jonathan Buch <john at oxyliquit.de> wrote:
>
> Hi,
>
> > <div style="color: \#{@color}">
> > <?r colors = [ "#ff0", "#f00", "#00f", #"0ff" ] ?>
> > <Box color="colors[rand(colors.size)]">
>
> are you sure? `colors[rand(colors.size)]` will have to be eval'ed
> somewhere, where is that done? Either magic or one has to do that
> in the Element oneselve (probably with a binding to the controller
> scope again).
>
> Jo
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
--
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070710/9e9a3ae3/attachment-0001.html
More information about the Nitro-general
mailing list