[Nitro] Elements and element children

George Moschovitis george.moschovitis at gmail.com
Thu May 31 15:51:09 EDT 2007


they are a hash so you can access the chlidren content like this:

#{content :children_name}

But, now that you are mentioning it, I can convert the Hash to a (facets)
Dictionary. Well try this tomorrow...

thanks,
-g.

On 5/31/07, arne at arnebrasseur.net <arne at arnebrasseur.net> wrote:
>
> Hi,
>
> I've been playing a bit with elements, but the results aren't really as
> what I would have expected, especially regarding child elements.
>
> It occurred to me that in theory elements could be used a bit like layout
> managers in AWT/Swing, for instance you could create a Grid element that
> would wrap it's children in div's with some style info so they are aligned
> in a grid
>
> <Grid cols="3">
>    <One />
>    <Two with="an option" />
>    <One id="other One" />
>    ...
> </Grid>
>
> And it would render (excuse the ascii art)
>
> +-------+-------+-------+
> |       |       |       |
> | One   |  Two  | other |
> |       |       |  One  |
> +-------+-------+-------+
> |       |       |       |
> |  ...  |       |       |
> |       |       |       |
> +-------+-------+-------+
>
> Maybe it's a crazy idea, but nevertheless... The biggest obstacle I'm
> finding is that @_children is a hash, so you don't have the order of the
> children. I would've expected it to be an array.
>
> Am I mising something? Is this simply not what they're intended for?
>
> thx,
>
> (ab)
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://georgeandstella.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/20070531/e1e7a0cb/attachment-0001.html 


More information about the Nitro-general mailing list