Re: More default methode issues
Frank <[email protected]> Fri, 11 Jun 2010 02:58:37 -0600
| Newsgroups | gmane.emacs.eieio |
|---|---|
| Message-ID | <[email protected]> |
Eric M. Ludlam schrieb: >On 06/06/2010 04:05 PM, Frank wrote: > > >>Frank schrieb: >> >> >> >>>(func (make-instance 'foo)) >>> >>>;; Must be wrong as a methode which is bound for class foo is called! >>>;; I assume the default methode should be called. >>>(func 666) >>> >>> >>> >>I think I have to correct myself a bit; >>(func 666) is probably not supposed to call the default method as 666 is >>not an (eieio) object here; >>(It should throw an error instead!!??) >> >>Considering we add this >>(defclass any () >> ()) >> >>Then this calls the default method as expected >>(func (make-instance 'any)) >> >> > >Hi Frank, > >To make sure I didn't miss anything, does this mean your questions are >all answered? > >Thanks >Eric > > Nope not really. If I evaluate (func 666) then the result is "func foo :after 666". Obviously this call is dispatched to a method which is defined for objects of class foo but 666 is not such an object. This looks wrong to me. Please correct me if this is not the case (as I'm a beginner with LISP/CLOS). Thanks Frank ------------------------------------------------------------------------------ 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