[Seaside] sending messages in lists

Tim Rowledge tim@sumeru.stanford.edu
Mon, 03 Jun 2002 16:57:42 -0700

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

> > So, how can one insert the result of sending a message like that into
> > the list items?
> <the part you need to know>
> remainingTries
>   |test|
>   test := locals at: #each.  "or 'test := locals last'"
>   ^ test allowedAttempts - user attemptsForTest: test
> </>
Ok, that works great but is really pretty inelegant, especially by
comparison to the rest of the system.

> <rambling>
> I've vaguely thought about sending the value of 'locals last' any time you
> have a keyPath that takes an argument, so that you could have
> <li sea:id="each/practiceTest">...  [remainingTries:] </li>
What would be wrong with allowing
<li sea:id="each/practiceTest">...  [remainingTries:each] </li>
or something similar? The parsing only needs to be able to pick up on
the local var name for this repeat (and any parents I suppose) which
ought not be much more difficult than all the work it does already,


Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: IPL: Invent Program Lines