2 Jan 2008 06:20
Render-widget-body for my own widget
Hi,
I have created a new widget with (defwidget) and want to render it.
After much guessing, I got it working, but now want to know why the
more natural solution doesn't work.
To render my widget I've defined the following method:
------------------------
(defmethod render-widget-body ((obj linkwidget) &rest args)
(declare (ignore args))
(with-html
(:p (render-widget (title obj))))
(:p "Link")))
------------------------
My question is, why do I need to have the form (render-widget) if the
form (title obj) returns a string?
In other words, I had this first:
------------------------
(defmethod render-widget-body ((obj linkwidget) &rest args)
(declare (ignore args))
(with-html
(:p (title obj)))
(:p "Link")))
------------------------
Thanks
Joubert
--~--~---------~--~----~------------~-------~--~----~
(Continue reading)
RSS Feed