On Friday, November 1, 2002, at 02:45 AM, Alex wrote:
I'm finding some strange behavior:
section = widgets.Div() la = widgets.Anchor() section.add(la) section.add(widgets.Br()) section.add(widgets.Text('blah'))
Here, everything inside 'section' is being replaced by the widgets.Text -- everything added before it is lost. This seems to be happening every time a Text widget is added to a Div; everything before it is lost.
This is a known bug with the way woven handles generating subwidgets -- I haven't decided what a satisfactory solution is yet. I'll think about it today. Generally, my solution is to not do too much work in a single Widget -- just apply separate view= attributes to nodes inside of nodes and let each Widget handle a single level of DOM nodes. I think I have a simple solution that will make the above use case work properly, though. I'll write a test for it and see if I can get the solution checked in today. Thanks for the code. Donovan