[Nitro] how to initialize @color and make it visible into the template?
Jimmy Jazz
Jimmy.Jazz at gmx.net
Mon Jul 9 14:19:45 EDT 2007
Hello,
I don't see how to mix static and dynamic aspect of nitro in an easy way.
I would like to use some nitro functionalities like in tc_element.rb:
class Box < Raw::Element
def open
%|<div style="color: #@color">|
end
def close
"</div>"
end
end
but Nitro seems to ignore @color wherever you declare it (controller,
template, <?r ?>, %{}, etc.). Any advice ?
I don't want to be careless. Nitro looks nice but it is finally far more
complicated to use as it looks like at first, mostly because there
aren't usable examples available to beginners. Please, don't make it to
elitist :( I'm really feeling i'm using the hard way, not to mention
nitro is using facets too.
@George: It is like deciphering the Rosetta stone to understand Egyptian
hieroglyphs writing. Easy for one who can read Greek but harder to the
other ;)
Also, nobody react to my proposal to redefine the @_children instance
variable into a class variable. I was able to access a child element
like that. Was it so silly ?
gs
--
|\ _,,,---,,_
ZZZzz /,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070709/2b7eebeb/attachment.html
More information about the Nitro-general
mailing list