From: Matt Welland <[email protected]> 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 _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
