WACanvasTag dynamically creation

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

WACanvasTag dynamically creation

Sylvain pralon
Hello,

I just want to know can I create a WACanvasTag (WAAnchorTag or anything
else) dynamically, not in a renderContentOn: method.
Imagine I want to store these objects in collection which will be
rendered later.
I tried but apparently I need a "document", the parent Canvas I guess.
Where can I found this information in the WAComponent where I am ?

Thanks

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

Re: WACanvasTag dynamically creation

Philippe Marschall
2007/7/25, Sylvain Pralon <[hidden email]>:
> Hello,
>
> I just want to know can I create a WACanvasTag (WAAnchorTag or anything
> else) dynamically, not in a renderContentOn: method.

Yes

> Imagine I want to store these objects in collection which will be
> rendered later.

What about storing a render block that takes an html canvas as an argument?

> I tried but apparently I need a "document", the parent Canvas I guess.

That's needed for serialization, nesting, callback registration and
stuff. If you don't need this you can just create them with new (for
most of them). Nesting will probably be a problem because we don't
really add a child to a tag.

> Where can I found this information in the WAComponent where I am ?

Kinda depends what you want to do. If you are looking for way to
render html outside of a component have a look at WACanvasBrushTest >>
#assert:gives:

Cheers
Philipe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside