Dynamic components?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic components?

EstebanLM
Hi all,
I'm a little bit confused... I'm trying to add dynamically created components to a component of seaside... the scheme is as follows:
1) I create an empty Set in Board object
2) I create a Menu who renders a list of options, lets say A and B, both of them creates and add a new Note to Board
3) Component Note is very simple (just a div with a text)
4) Of course, Board#renderContextOn: render menu, iterates on "notes" and call html #render: wich each one. Message #children returns an array with all childs of Board (menu+notes)

I thought this would show a page with the menu and the notes dynamically added to the page... well, it does not work :(
It just shows the menu and the last added note. What I'm doing wrong?

Thanks,
Esteban

--
"Querer es suscitar las paradojas"
Camus. El míto de Sísifo.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic components?

Philippe Marschall
2007/6/30, Esteban Lorenzano <[hidden email]>:

> Hi all,
> I'm a little bit confused... I'm trying to add dynamically created
> components to a component of seaside... the scheme is as follows:
> 1) I create an empty Set in Board object
> 2) I create a Menu who renders a list of options, lets say A and B, both of
> them creates and add a new Note to Board
> 3) Component Note is very simple (just a div with a text)
> 4) Of course, Board#renderContextOn: render menu, iterates on "notes" and
> call html #render: wich each one. Message #children returns an array with
> all childs of Board (menu+notes)
>
> I thought this would show a page with the menu and the notes dynamically
> added to the page... well, it does not work :(
> It just shows the menu and the last added note. What I'm doing wrong?
Minimal code to reproduce the problem (as CS, ST or MCZ) would help.
Also more information about your setup (Smalltak and Seaside version).

Cheers
Philippe

> Thanks,
>  Esteban
>
> --
> "Querer es suscitar las paradojas"
> Camus. El míto de Sísifo.
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic components?

Lukas Renggli
In reply to this post by EstebanLM
> I thought this would show a page with the menu and the notes dynamically
> added to the page... well, it does not work :(
> It just shows the menu and the last added note. What I'm doing wrong?

Is there maybe a problem with Squeak block-closures? How does your
render code look like? What happens if you replace it with something
simple like:

    renderContentOn: html
         html render: self children

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic components?

EstebanLM
Lukas, Phillipe
Thanks for the help. I re-made the image from zero and it works. No idea what happened, some corruption exploring the image, maybe...

Thanks!
Esteban

On 6/30/07, Lukas Renggli <[hidden email]> wrote:
> I thought this would show a page with the menu and the notes dynamically
> added to the page... well, it does not work :(
> It just shows the menu and the last added note. What I'm doing wrong?

Is there maybe a problem with Squeak block-closures? How does your
render code look like? What happens if you replace it with something
simple like:

    renderContentOn: html
         html render: self children

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
"Querer es suscitar las paradojas"
Camus. El míto de Sísifo.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside