[Seaside] sending messages in lists

Tim Rowledge tim@sumeru.stanford.edu
Mon, 03 Jun 2002 18:25:29 -0700

Avi Bryant <avi@beta4.com> is claimed by the authorities to have written:

> Ah, it's a fine line... what about [remainingTries: each foo]?
> [remainingTries: (each foo sortedBy: bar)]?  Do you only allow that for []
> strings, or do you also allow it for something like
> <if sea:id="anyTriesLeft:each">?  These aren't rhetorical questions, I
> just see danger ahead.
Err, Sir, don't know, Sir :-)
I some sense I'd love to see it ending up as pretty much pure Smalltalk,
but I know that not everybody is as single (simple?) minded as I am.

Maybe something of the form
ol _ OrderedList on: self practiceTests.
ol build:[:el|
  (ListItem id: el)
    add: (Anchor id: #doPracticeTest: value: el text:'PracticeTest ', el id)
    add: (self remainingTries: el) asText]

where build is sort of like collect but assembles things into the
receiver. Dunno, very off the top of the head. Prob'ly wouldn't work.

> I've even considered going much further down that road by changing the
> template parser to output sourcecode instead of an element tree;
That could be interesting in various ways, not least that it would be a
perfecly ordinary closure that would be amenable to dynamic translation
and going jolly fast.

The bit that bothers me about bindings etc is the sort-of hidden magic
about them; they're off to the side in a way.

Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Kept an open mind -- and his brains fell out.