Support for collections in Magritte is weak. For quite some time I
planned to add support for multiplicities like in EMOF and UML,
however I never found the time to actually do it.
What I have is, a class with various fields I want to
have set,
including a collection of strings. The others were no problem,
MANumberDescription and so on, but I don't see anything for
handling a collection. The nearest thing I saw was
MAToManyDescription?
Yes, MAToManyDescription is what you are looking for. If you are not
using fully described objects as children, you want to check out its
subclass MAToManyScalarRelationDescription. Maybe Philippe can give
you more hints on how to use that?
The description probably looks something like this:
^ (MAToManyScalarRelationDescription selector: #flowers)
reference: MAStringDescription new;
default: #();
yourself
I looked at MACollection but that said it is for a
collection of
*descriptions*. I tried it anyway, and it didn't understand
#default. :)
I don't have MACollection in my image, only MAContainer. As you said,
this is a collection of descriptions; not a description on collections.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch