[Seaside] Woohoo, made a list of links! Now for the next bit...

Tim Rowledge tim@sumeru.stanford.edu
Mon, 13 May 2002 12:04:24 -0700


In message <Pine.LNX.4.30.0205122339560.7250-100000@cable.beta4.com>
          Avi Bryant <avi@beta4.com> wrote:


> Ah.  Explanation: templates are expected to be static and are thus cached
> after parsing (the cache is cleared when methods are added/changed, so
> this is usually pretty transparent).  If the html was actually parsed
> every time you saw a page things would be much slower.
Makes sense; definitely something to add to tutorial documentation
sometime

> > > Now, this is basically
> > >
> > >   child onAnswer: [:v | parent answerQuestion: v]
> > >
> > > Does that make any more sense?
> > A little - but the crucial confusion I'm suffering right now is how that
> > is invoked.
> 
> Well, that would get invoked whenever the child wanted to invoke it.  That
> is, presumably the child's onAnswer: method is going to store that block
> away in an inst var, and at some later point (when one of its action
> methods is called), is going to evaluate that block.  None of this is
> necessary, as the child could just directly call 'parent answerQuestion:
> foo' at that point instead, I was just trying to illustrate some uses of
> bindings.
OK; I was trying to see how on earth it could work by magic when in fact
it works by plain old technology :-)
I think I stumbled on some of the answer when I inadvertently managed to
set my QuestionPage 'question' var to a SEAMethodThingy instead of an
actual question. Every time I tried to use [question.description] it
would give me a backtrace about how this SEAMethodCall-whotsit didn't
understand #description - took me a while to work that one out.
Part of the problem is that the only examples of #set:toMethod: in the
image are rather opaque.

> The value of each binding is retrieved on every display, yes.  Note that
> for method bindings this does not mean the method is invoked, just that a
> block is retrieved which would invoke the method if it were invoked
> itself.
OK, clear enough. Doctime again...
> 
> Order is undefined.  For more detail, look at these
> methods in IAComponent: #bind:to:, #pullBindings, #pushBindings.
That could potentially be a problem if somebody wrote code that depended
on something that depended on... etc. OBviously I can't think of an
example right now - one never can - but I'm almost sure it could be
done.

Thanks for the help - I'm making much better progress now :-) All this
application stuff is very foreign to me; I don't rise this high up from
the metal very often and it always seems to hurt.

tim

-- 
Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Asking whether machines can think is like asking whether submarines can swim.