[Bese-devel] [PATCH] wrapping-standard method combination

Vladimir Sekissov svg at surnet.ru
Fri Dec 2 13:24:34 UTC 2005


Good day,
mb> > Other things I can do with other methods but wrapping methods seems
mb> > for me the only right place for initialization.
mb> 
mb> then i think we wolud do better to _add_ something to wrapping
mb> standard as opposed to changing the current evaluation order.
mb> 
mb> if you can think of a name for methods which wrap around sub class
mb> methods and are not (in any way) overridable

What about :wraparound.

mb> , i'll add it.

Thank you, Marco.

It'll be very useful addition. With such method combination I could
write initialisation/finalisation code for method chains easily.

Something like:

(defmethod save-object :wraparound (obj &optional kind)
   (if kind
     (call-next-method)
     ;; initialize defaults
     (call-next-method obj (kind-from-obj-state obj)))

   ;; ok - all job done, nobody on the path,
   ;; do cleanup and logging
   (clear-changes obj)
   (notify-event-handler '(:changed ,obj)))

Best Regards,
Vladimir Sekissov



More information about the bese-devel mailing list