[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] How to instantiate a Meroon object by class name.
From: |
Ed Watkeys |
Subject: |
[Chicken-users] How to instantiate a Meroon object by class name. |
Date: |
Thu, 18 Aug 2005 10:28:44 -0400 (EDT) |
User-agent: |
SquirrelMail/1.4.4 |
Hi,
I'm writing a program where I'd like to instantiate a Meroon object by
class name. Based on what I know about Meroon, it seems like the easiest
way is to to something like this:
(define (instantiate-object-by-class-name name)
(let ((make-instance
(eval (string->symbol
(string-append
"make-"
(symbol->string name))))))
(make-instance)))
BUT make-instance requires that all fields be initialized, so this proc
will only work with class with no fields. What I'd really like is a way to
use the instantiate macro but specify a computed class name. A little
macro magic could take care of that problem, but is there a better (more
Meroonic?) way to do what I'm looking for?
Regards,
Ed
--
Transmogrify, LLC * <http://xmog.com>
- [Chicken-users] How to instantiate a Meroon object by class name.,
Ed Watkeys <=