[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
goops: initialize :after
From: |
David Pirotte |
Subject: |
goops: initialize :after |
Date: |
Mon, 02 Oct 2000 00:59:41 +0200 |
Hello,
I can not find similar methods in goops then we had in CLOS:
defmethod initialize-instance :after ((blabla <...> ) &rest args)
and
defmethod (setf ...) :after ...
here is my problem: I wish to define a class a slot of which will
store a date as an integer and a date as a valid string date
(define-class <chantier> ()
...
(dte-dmis #:init-value #f #:accessor dte-dmis #:init-keyword #:dte-dmis)
(dte-dmis-str #:init-value "" #:accessor dte-dmis-str #:init-keyword
#:dte-dmis-str)
...
)
but I would like that at intialization time, only passing
#:dte-dmis-str <value>
it calls something that would 'initialize' the other slot, dte-dmis
BUT only if
#:dte-dmis is not given
in the same spirit, I'd like to be able to define (redefine)
the set!, which would take optional arg so that if I already know the
date-number of a date, I don't need to compute but just affect the other
slot:
(define-method (set! dte-dmis-str) :after (dte-dmis-str (obj
<chantier>) . dte-nb)
...
)
can anyone knowing goops better then I has an idea ?
thanks,
david
- goops: initialize :after,
David Pirotte <=