[Bese-devel] task component related questions

Aleksandar Bakic a_bakic at yahoo.com
Fri Sep 23 22:02:01 UTC 2005


[skipped explanation of the original intent]

> > (defmethod render-on :around ((res response) (task task-component))
> >   (with-call/cc
> >     (start task)) ; how exactly does this work?
> 
> the 'problem' is that methods defined via defmethod/cc (as all actions
> are) and functions defined via defun/cc _must_ be called within the
> dynamic context of a with-call/cc (these funcitons and methods don't
> have a corresponding "regular" implementation).

That's fine, thanks. Is this part of my code still OK, or it is not for some
reason? I mean the mixing of the regular and continuation-based code in the
first place.

> >   (let ((active-component (place (component.place task)))) ; ???
> >     (if (eq task active-component) ; ???
> 
> basically what does is say: if the component in question is the
> original component (no call'ing) then call-next-method, otherwise
> render the component in question. this is, more or less, repeating the
> work done by call/answer.
> 
> >         (call-next-method)
> >         (render-on res active-component)))) ; is this a caller?
> 
> what do you mean by caller?

If "no call'ing" is false, then there is a caller. I meant the active-component
by "caller".

> > (defmethod render-on ((res response) (task task-component))
> >   nil) ; some default behavior, needed for the above method
> 
> this is, imho, a sign that something could improved.

This is needed for those two task components in the examples that do not have
primary render-on methods. It is not needed for components that do have primary
render-on methods. With the above solution, both types of components seem to
work. I only worry they might break some day for some reason. That is why I
asked.

Thanks,
Alex


	
		
______________________________________________________ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 




More information about the bese-devel mailing list