[Bese-devel] task component related questions
Aleksandar Bakic
a_bakic at yahoo.com
Thu Sep 22 00:00:52 UTC 2005
Hi,
I noticed that the task component assumes that there will be no render-on
methods defined for its (and its subclasses') instances. However, when I wanted
to add the login-mixin capability (in the style of Larry D'Anna as posted on
this list) to a component that already had a render-on method, I encountered a
problem. Below is how I "fixed" it (notice the comments). Marco, please let me
know if you think it is correct. It seems to work, but I am still in the
process of figuring out the interpreter stuff. (It would also help if you
elaborated in a few sentences about interesting/important issues in this
context.)
(defgeneric/cc start (task) ; this used to be just defgeneric!
(:documentation "Action which gets called automatically when TASK
component is active. Use DEFACTION to define your own START action."))
(defmethod render-on :around ((res response) (task task-component))
(with-call/cc
(start task)) ; how exactly does this work?
(let ((active-component (place (component.place task)))) ; ???
(if (eq task active-component) ; ???
(call-next-method)
(render-on res active-component)))) ; is this a caller?
(defmethod render-on ((res response) (task task-component))
nil) ; some default behavior, needed for the above method
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