[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: namespaces, goops, etc.
From: |
Lars J. Aas |
Subject: |
Re: namespaces, goops, etc. |
Date: |
Fri, 3 Nov 2000 22:19:50 +0100 |
User-agent: |
Mutt/1.2.5i |
On Fri, Nov 03, 2000 at 11:07:51PM +0200, Michael Livshin wrote:
: "Lars J. Aas" <address@hidden> writes:
: > Sorry, but I always get the same error whatever I try (guile 1.4, goops
0.9):
: >
: > guile> (define (hiho)
: > ;; define the generic locally:
: > (define-generic foo)
: > ;; now happily specialize it:
: > (define-method foo ((x <top>) x)))
: > guile> (hiho)
: > ERROR: In procedure cadr:
: > ERROR: Wrong type argument in position 1: (address@hidden foo)
: > ABORT: (wrong-type-arg)
:
: [ I wonder why all my blind assumptions turn out wrong today? ]
:
: mea culpa.
:
: but it *should* work, I think. ditto for `define-class'.
:
: should ask Mikael if this is supposed to be this way...
:
: > I've also tried with add-method! without success. There's probably
: > a syntax error if what I've tried, but I can't spot it...
Oversight - the problem is with the define-generic, not with define-method,
and it shouldn't be possible with a syntax problem on that line ;-)
: this works for me:
:
: (define-generic foo)
:
: (define (hiho)
: (add-method! foo (method ((x <top)) x)))
When the generic is defined in the toplevel it works with both
define-method and add-method!.
: and yes, tested this time ;).
Hehe.
: sorry,
No problem. Got to read another one of your .sigs :)
Lars J
- namespaces, goops, etc., Lars J. Aas, 2000/11/03
- Re: namespaces, goops, etc., thi, 2000/11/03
- Re: namespaces, goops, etc., Michael Livshin, 2000/11/03
- Re: namespaces, goops, etc., Lars J. Aas, 2000/11/03
- Re: namespaces, goops, etc., Michael Livshin, 2000/11/03
- Re: namespaces, goops, etc., Lars J. Aas, 2000/11/03
- Re: namespaces, goops, etc., Michael Livshin, 2000/11/03
- Re: namespaces, goops, etc.,
Lars J. Aas <=
- Re: namespaces, goops, etc., Lars J. Aas, 2000/11/03
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06
- Re: namespaces, goops, etc., Michael Livshin, 2000/11/07
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/08
- Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06
Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06
Re: namespaces, goops, etc., Mikael Djurfeldt, 2000/11/06