[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] tinyclos on windows
From: |
Felix |
Subject: |
Re: [Chicken-users] tinyclos on windows |
Date: |
Tue, 28 Dec 2010 12:39:50 +0100 (CET) |
From: Matt Welland <address@hidden>
Subject: Re: [Chicken-users] tinyclos on windows
Date: Mon, 27 Dec 2010 17:12:03 -0700
> BTW if tinyclos can be kept limping along then for future dev I'm happy to
> use coops. No need for a translation layer then.
We'll try to get this working.
>
> This fails with "Unbound variable foo" (4.60 on Mingw)
>
> (use tinyclos)
> (define-class <bar> ()
> (yep))
>
> (define-method (initialize (bar <bar>) initargs)
> (call-next-method)
> (slot-set! bar 'yep #t)
> (initialize-slots bar initargs))
>
> (define-method (foo (bar <bar>))
> (if (slot-ref bar 'yep)
> (print "We're ok")
> (begin
> (slot-set! bar 'yep (not (slot-ref bar 'yep)))
> (foo bar))))
You have to precede the method-definition with
(define-generic foo)
cheers,
felix