Anonymous classes with instance variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Anonymous classes with instance variables

Martin Beck-3
Hi there,
I've got a simple problem with creating anonymous classes. Usually, one
would do a Behavior basicNew, adjust the superclass and let the original
object change its class to our anonymous one. However, as the name
indicates, I can only compile new behavior to it, but no status. This
means, I want to have an anonymous class with instance variables, which
Behavior does not support.
I experimented with ClassDescription and Metaclasses, setFormat: but
could not achieve what I want... Any ideas?

Regards,
Martin

Reply | Threaded
Open this post in threaded view
|

Re: Anonymous classes with instance variables

Noury Bouraqadi
Hi Martin,

Did you tried MetaclassTalk
http://vst.ensm-douai.fr/MetaclassTalk

It allows defining new metaclasses, so you creating new kinds of  
classes.

Regards,
Noury
On 5 déc. 07, at 14:30, Martin Beck wrote:

> Hi there,
> I've got a simple problem with creating anonymous classes. Usually,  
> one would do a Behavior basicNew, adjust the superclass and let the  
> original object change its class to our anonymous one. However, as  
> the name indicates, I can only compile new behavior to it, but no  
> status. This means, I want to have an anonymous class with instance  
> variables, which Behavior does not support.
> I experimented with ClassDescription and Metaclasses, setFormat: but  
> could not achieve what I want... Any ideas?
>
> Regards,
> Martin
>

Noury Bouraqadi
------------------------------------------------------------------
Dr. Noury Bouraqadi - Enseignant/Chercheur
Responsable de l'enseignement de l'informatique
ARMINES - Ecole des Mines de Douai - Dept. I.A.
http://vst.ensm-douai.fr/noury

European Smalltalk Users Group Board
http://www.esug.org
------------------------------------------------------------------