Leslie P. Polzer wrote: > On Sun, Dec 21, 2008 at 12:37:50PM +0100, Helmut G. Enders wrote: >> >> (defmethod render-widget (obj &rest args &key inlinep &allow-other-keys) >> (declare (special *page-dependencies*)) >> (if (ajax-request-p) >> (dolist (dep (dependencies obj)) >> (send-script >> (ps* `(,(typecase dep >> (stylesheet-dependency 'include_css) >> (script-dependency 'include_dom)) >> ,(puri:render-uri (dependency-url dep) nil))) >> :before-load)) >> (setf *page-dependencies* >> (append *page-dependencies* (dependencies obj)))) >> >> ;; <changed> >> ;; Here is a test, where I added the prefix functions. >> ;; It's ugly, because safe-apply apears on the if and else part. > > Huh? I see two SAFE-APPLY calls, but they are both in the same > control path (COND/INLINEP). What if/else part are you referring to?
The cond below is in the orginal text an if construct. I changed it to a cond because I needed three functions in the (if inlinep ... part. I'm not to deep in code, so I copied the safe-apply, only to see if my prefix function appears again. :-). > >> (cond (inlinep (safe-apply (widget-prefix-fn obj) obj args) >> (apply #'render-widget-body obj args) >> (safe-apply (widget-suffix-fn obj) obj args)) >> (t (apply #'with-widget-header obj #'render-widget-body >> (append >> (when (widget-prefix-fn obj) >> (list :widget-prefix-fn (widget-prefix-fn obj))) >> (when (widget-suffix-fn obj) >> (list :widget-suffix-fn (widget-suffix-fn obj))) >> args)))) >> ;; </changed> >> >> (setf (widget-rendered-p obj) t)) Helmut --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "weblocks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/weblocks?hl=en -~----------~----~----~----~------~----~------~--~---
