This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GOOPS: inherit method


>>>>> "Sascha" == Sascha Ziemann <szi@aibon.ping.de> writes:

Sascha> Hi, How can I inherit a method?  It works with change-class on
Sascha> a clone of the original object, but I would prefer a way to
Sascha> call the method without allocating space for a copy of the
Sascha> object.

I think you're looking for this:

(define-method str ((obj <2D>))
  (string-append ("{" (next-method) ";" 
                  (number->string (slot-ref obj 'y)) "}")))

  -Eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]