logo       

Re: Adding instance variables during runtime: msg#00069

lang.smalltalk.squeak.beginners

Subject: Re: Adding instance variables during runtime

2006/12/12, Mathieu <mathk.sue@xxxxxxxxx>:
Look at Class>>addInstVarName:

Point addInstVarName: 'x'.


It's possible but not recommended (I think)

What you could try is to use a container as instVar (or classInstVar)
in which you can add several elements that will act as instVar.
It's a model called AOM (Adaptive Object Model)

have a look here: http://www.adaptiveobjectmodel.com/

Cédrick
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise