Default methods :before and :after aren't called
Frank <[email protected]> Wed, 02 Jun 2010 12:21:36 -0600
| Newsgroups | gmane.emacs.eieio |
|---|---|
| Message-ID | <[email protected]> |
Hi, Is this correct behaviour? It looks like only the :primary default method gets called even if there are :before and :after ones defined? (require 'eieio) (defclass foo () ()) (defmethod func :before (this) (message "default method :before: %s" this)) (defmethod func :primary (this) (message "default method :primary: %s" this)) (defmethod func :after (this) (message "default method :after: %s" this)) (defmethod func :before ((this foo)) (message "foo's method :before: %s" this)) (defmethod func :primary ((this foo)) (message "foo's method :primary: %s" this) 123) (defmethod func :after ((this foo)) (message "foo's method :after: %s" this)) (func (make-instance 'foo)) ;; I'll get this which looks correct to me. ;; ;; foo's method :before: [object foo foo] ;; foo's method :primary: [object foo foo] ;; foo's method :after: [object foo foo] ;; 123 (defclass bar () ()) (func (make-instance 'bar)) ;; Hmmm what about the :before and :after default methods? ;; ;; default method :primary: [object bar bar] ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo