[Eliminate use of render clinton@unknownlamer.org**20070914181813 Rather than use render and the editablep flag the interface-element library instead uses present and accept with an :around method on both to render the value box properly. All of the subordinate methods for composite views have been reworked to accept a presenter argument that is then passed either present or accept depending on the caller. ] { hunk ./src/form.lisp 97 +(defmethod present :around ((element t-element) (view ieview)) + (render-box view element + (delay (render-value-box view element + (delay (call-next-method)))))) + +(defmethod accept :around ((element t-element) (view ieview)) + (render-box view element + (delay (render-value-box view element + (delay (call-next-method)))))) + hunk ./src/form.lisp 122 -(defmethod render-element :wrapping ((view ieview) (e t-element)) - (render-box view e (delay (call-next-method)))) - hunk ./src/form.lisp 125 - (render-value-box view e (delay (funcall (if (editablep e) #'accept #'present) - e - view)))) + (funcall (if (editablep e) #'accept #'present) + e + view)) hunk ./src/form.lisp 356 - (declare (ignore slot-names initargs)) + (declare (ignore slot-names)) hunk ./src/form.lisp 367 -(defmethod render :before ((c composite-element)) - (dolist (sn (slot-elements c)) - (setf (widget-component.css-class (slot-value c sn)) - (and (editablep c) - (when (member sn (invalid-slots c) :key #'car) - "ucw-invalid-slot"))))) +(flet ((composite-present-accept-before (c) + (dolist (sn (slot-elements c)) + (setf (css-class (slot-value c sn)) + (and (editablep c) + (when (member sn (invalid-slots c) :key #'car) + "ucw-invalid-slot")))))) + (defmethod present :before ((c composite-element) view) + (composite-present-accept-before c)) + (defmethod accept :before ((c composite-element) view) + (composite-present-accept-before c))) hunk ./src/form.lisp 389 -(defmethod render-slot-value-box ((view composite-view) (c composite-element) slot) - (declare (ignore view c)) - (<:td :class "ucw-composite-slot-value" (render slot))) +(defmethod render-slot-value-box ((view composite-view) (c composite-element) + slot presenter) + (declare (ignore c)) + (<:td :class "ucw-composite-slot-value" (funcall presenter slot view))) hunk ./src/form.lisp 394 -(defmethod render-slot ((view composite-view) (c composite-element) (slot-name symbol)) +(defmethod render-slot ((view composite-view) (c composite-element) + (slot-name symbol) presenter) hunk ./src/form.lisp 397 - (let ((slot (slot-value c slot-name)) ) - (render-slot view c slot)))) + (let ((slot (slot-value c slot-name))) + (render-slot view c slot presenter)))) hunk ./src/form.lisp 400 -(defmethod render-slot ((view composite-view) (c composite-element) (slot t-element)) +(defmethod render-slot ((view composite-view) (c composite-element) + (slot t-element) presenter) hunk ./src/form.lisp 405 - (unless (editablep c) - (setf (editablep slot) nil)) hunk ./src/form.lisp 409 - (render-slot-value-box view c slot)))) + (render-slot-value-box view c slot presenter)))) hunk ./src/form.lisp 411 -(defmethod render-slot ((view composite-view)(c composite-element) (slot-list sequence)) +(defmethod render-slot ((view composite-view)(c composite-element) + (slot-list sequence) presenter) hunk ./src/form.lisp 417 - (render-slot view c x))) + (render-slot view c x presenter))) hunk ./src/form.lisp 420 -(defmethod render-slot ((view composite-view) (c composite-element) slot-name) +(defmethod render-slot ((view composite-view) (c composite-element) + slot-name presenter) hunk ./src/form.lisp 432 - (render-slot-value-box view c slot)))) + (render-slot-value-box view c slot presenter)))) hunk ./src/form.lisp 434 -(defmethod render-slots ((view t) (c composite-element) slot-names) +(defmethod render-slots ((view t) (c composite-element) slot-names presenter) hunk ./src/form.lisp 439 - (delay (render-slot (slot-view c) c slot-name)))) + (delay (render-slot (slot-view c) c slot-name presenter)))) hunk ./src/form.lisp 444 - (render-slots view c (slot-elements c :test #'enabledp))) + (render-slots view c (slot-elements c :test #'enabledp) #'accept)) hunk ./src/form.lisp 448 - (render-slots view c (slot-elements c :test #'enabledp))) + (render-slots view c (slot-elements c :test #'enabledp) #'present)) hunk ./src/form.lisp 911 -(defmethod render-slot ((view set-view) (set set-element) slot-name) +(defmethod render-slot ((view set-view) (set set-element) slot-name presenter) hunk ./src/form.lisp 916 - (render slot))))) + (funcall presenter slot view))))) + hunk ./src/form.lisp 919 -(defmethod render-item ((view set-view) (set set-element) item slot-names) +(defmethod render-item ((view set-view) (set set-element) item + slot-names presenter) hunk ./src/form.lisp 924 - (render-slot view set slot-name))) + (render-slot view set slot-name presenter))) hunk ./src/form.lisp 926 -(defmethod render-items ((view set-view) (set set-element) slot-names) +(defmethod render-items ((view set-view) (set set-element) slot-names presenter) hunk ./src/form.lisp 939 - (delay (render-item view set item slot-names)))) + (delay (render-item view set item + slot-names presenter)))) hunk ./src/form.lisp 947 - (render-items view set (slot-elements (item-viewer set) :test #'enabledp)) + (render-items view set (slot-elements (item-viewer set) :test #'enabledp) + #'present) hunk ./src/packages.lisp 169 + #:make-ie }