[Seaside] children & egg problem
Kamil Kukura
kamk at volny.cz
Wed Sep 8 11:10:10 CEST 2004
radoslav hodnicak wrote:
> I did that and noticed a weird thing. Imagine a root component with two
> columns, navigation left and "main" right (just like the old squeakmap
> browser example). Navigation causes #call:s in the main component. The
> main is #render:ed hence it should be in children(*).
I may be wrong, but this scenario confuses me with flow control. In what
time/stage do your #call:s are getting cleared (being #answer-ed)? My
navigation through set of components looks like this:
two instance variables: components, currentComponent are initialized like:
components _ {
'menu item 1' -> ComponentOne new.
'menu item 2' -> ComponentTwo new.
'menu item 3' -> ComponentThree new}.
currentComponent _ components first.
In the rendering recipe there's table with left and right cell. For left
side there's simple menu:
html unorderedList: [
components do: [:c |
html listItem: [
html anchorWithAction: [currentComponent _ c]
text: c key]]]
And the right side is simply rendered with intended component:
html render: currentComponent.
--
Kamil
More information about the Seaside
mailing list