[Seaside] repeats on home-made components

Tim Rowledge seaside@lists.squeakfoundation.org
Thu, 18 Jul 2002 11:03:41 -0700


The repeat stuff -
<li sea:id="each/myList">
etc is wonderfully useful.

I want to do something similar with my question components and don't see
quite how. The mental block is related to the fact that they currently
work with bindings setup in addBindingsTo: and I don't see how to get
around that.

For example for demo purposes I needed to have five questions displyed
on a single page and the best I could do quickly was
html
...
<page sea:id="pane1"></page>
<page sea:id="pane2"></page>
....

addBindingsTo: template
(template elementNamed: 'pane1')
	class....
	set: #theQuestion toPath: #theQuestion1
 (template elementNamed:'pane2')
 	class....
etc
plus implementing theQuestion1, theQuestion2 etc. Yuck! Works fine for
the demo though :-)

What's the least I can do to improve this so I can do something more
flexible like
<page sea:id="pane/panes"></page>

It's not worth spending huge amounts of time on given that the system is
getting a major rewrite for all this binding stuff, but if there is
something sensible I can do for 0.93 it would be nice.

tim

-- 
Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Meets quality standards: It compiles without errors.