From: drewc Date: Fri, 17 Jun 2005 03:04:12 +0000 (-0700) Subject: moved slot initialisation from before render-on to make-presentation time. X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/commitdiff_plain/2acd3ba2f077f934e3411b702ba97bc2520f8167?hp=d1bb68e0d5a36d6fd290ff82fd16d2663f207e4e moved slot initialisation from before render-on to make-presentation time. its was in and :around on render-on before there was a make-presentation, and i was always looking for a better place to put it. i needed it to be there today, so it's a better place for sure. darcs-hash:20050617030412-39164-260fdbf937819dcdbdf2552ce54a92ef138bbec7.gz --- diff --git a/src/mewa/mewa.lisp b/src/mewa/mewa.lisp index 919adb3..ce7ffb3 100644 --- a/src/mewa/mewa.lisp +++ b/src/mewa/mewa.lisp @@ -215,12 +215,6 @@ attributes is an alist keyed on the attribute nreeame." (setf (slots self) (find-slot-presentations self))) -(defmethod render-on :around ((res response) (self mewa)) - (unless (slot-value self 'initializedp) - (initialize-slots self)) - (setf (slot-value self 'initializedp) t) - (call-next-method)) - (defmethod make-presentation ((object t) &key (type :viewer) (initargs nil)) (let* ((p (make-instance 'mewa-object-presentation)) @@ -247,6 +241,8 @@ attributes is an alist keyed on the attribute nreeame." type)) (plist-union initargs (cddr a))))) (setf (slot-value i 'instance) object) + (initialize-slots i) + (setf (slot-value i 'initializedp) t) i))