[Nitro] how to initialize @color and make it visible into the template?

Jonathan Buch john at oxyliquit.de
Tue Jul 10 02:37:53 EDT 2007


>       <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).


Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

More information about the Nitro-general mailing list