[Seaside] dynamic subcomponents proposal

Tim Rowledge seaside@lists.squeakfoundation.org
Thu, 27 Jun 2002 16:43:50 -0700

Some follow up stuff -

I've just reworked some of my #html code to do my dynamic subcomponents
by copying the InspectorFrame idea. It works, but there were a couple
ofinteresting problems that might impact your thinking on how to do this
for future systems.

First problem was simply believing that hacking the children dictionary
could work! It does though, but it does help if you name your
subcomponent the same as the key you use in the dictionary.....

Second problem was that I needed to put in a fake class binding for the
frame's subcomponent in order to be able to get past buildign the
template (I think - I'm not at all familiar with the details and don't
want to be!). So, my #html looks like
	^'<questionPane sea:id="questionPane"></questionPane>'
and I have to have
addBindingsTo: template
	(template elementNamed: 'questionPane')
		class: OTMultipleChoiceQuestionComponent
in order for it to work.

Third, there is the problem endemic to use of wrappers - a component
that was happily refering to 'parent' now needs help. I chose to fudge
it by implementing the small number of involved methods in my frame
class (obviously just delegating to _its_ parent) but I wonder if I
could simply corrupt the subcomponent's parent oop to point back to the
'real' parent component? It might make for all sorts of fun, so I can't
be bothered to spend time trying to work out any subtle side-effects
right now.

Anyway, it's working well enough for now. Just thought you'd like to


Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Blew the hatch before the lock sealed.