[Seaside] Design Question of a very small game
Avi Bryant
avi at beta4.com
Tue Oct 26 13:15:52 CEST 2004
On Oct 22, 2004, at 4:27 PM, Jon Paynter wrote:
> So in this case where you have a page with several hundred links (or
> in my case, a big semi-dynamic menu).... What is the pattern to use?
I'm not sure what you mean; normally those hundreds of links would be
generated in a loop, and the lexical context (the block args in the
loop) would provide the information you need about exactly which link
was clicked.
> My app doesnt have #call: directly in renderContentOn: ... it calls
> instance methods which in turn call other components.
>
> example:
>>> renderConentOn: html
> .....
> html linkWithAction: [self heal] text: 'heal';break.
>
>>> heal
> | app |
> app := WAHeal new.
> app character: self selectedCharacter.
> app game: self game.
> self call: app.
> -------------------------
>
> That pattern gets repeated for many different functions.
Yes, that looks pretty normal.
> And as an afterthought -- the only time I DID try the task calls
> component pattern, I got wierd results.
Can you elaborate?
Avi
More information about the Seaside
mailing list