[Seaside] onAnswer: problems
Avi Bryant
avi at beta4.com
Wed Jun 2 06:39:14 CEST 2004
On Jun 1, 2004, at 9:17 PM, C. David Shaffer wrote:
> I'm not sure that I understand the dynamic context which executed my
> block. Is this a correct abbreviated stack where my onAnswer: block
> is evaluated? If so, then it is handled by my inner component's
> handler?
>
> ...a bunch of decorations in their processRequest:do:...
> ...my top level component>>processRequest:do: which catches
> WAAnswerNotification...
> ...a WAAnswerDecoration>>processRequest:do:...
> ...my inner component>>processRequest:do: which catches
> WAAnswerNotification...
No, it would be:
...a bunch of stuff...
... the outer component>>processRequest:do: which catches
WAAnswerNotification
... a WAAnswerDecoration>>processRequest:do: which catches
WAAnswerNotification
...the inner component>>processRequestActions:context:
...the callback that sends #answer:
...#answer: (which signals WAAnswerNotification)
... the handler block in the
WAAnswerDecoration>>processRequest:do:
... your block
So, the WAAnswerDecoration handler block evaluates your block, which
sends #answer: to the outer component, which signals another
WAAnswerNotification. That travels up the stack *past* the
WAAnswerDecoration's handler (which is in the middle of handling
something already) and to the outer component's handler in
#processRequest:do:. By default, this says "oh, an unhandled answer
from a child, better ignore it". But that's incorrect - the answer
originates from the outer component, and should get to travel further
up the stack.
As I said, this stuff is non-intuitive.
Avi
More information about the Seaside
mailing list