[Prev][Next][Index][Thread]
Re: [FD] creating classes at runtime
You're on the right track. There are at least two problems here, though:
(1) By default, classes are sealed. That is, <animal> is sealed, so you
can't create any subclasses. Define <animal> with 'define open class'.
(2) I bet 'superclasses:' needs a sequence, not a single class.
I didn't try it, but those two changes will get you farther.
dauclair@hotmail.com wrote in message <8fakp2$pqg$1@nnrp1.deja.com>...
>The DRM is a little vague on how to do this, but I'm looking to do
>something like this:
>
>
>// ---- code ----
>define class <animal> (<object>) end; // predefined
>
>// sometime later, the user wants to add a class
>// (by, e.g., supplying characteristics thru DUIM)
>define constant <mammal> = make(<class>, superclasses: <animal>);
>// ---- end-code ----
>
>The last line returns an error ... what'll get the expected results?
>
>Sincerely,
>Doug Auclair
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Follow-Ups:
References: