For this particular survey, there are 18 questions;
I'd like some
advice on how
to best use magritte to describe them. I've heard of
'multiplicites' in the
context of OneToMany relations -- so this is probably not what I
want -- but is
there a count attribute in magritte descriptions?
Yes, OneToMany relations is probably not what you want.
I'd like to avoid copy/pasting 18 field
descriptions if possible.
You can also create descriptions (or copy them from somewhere else)
programmatically. Just override #description on the instance (or
class) side of your object and return whatever you want.
Question>>description
^ super description copy
addAll: OtherClass1 description copy;
addAll: OtherClass2 description copy;
yourself
The problem you probably now run into is that Question do not
understand the stuff from OtherClass1 and OtherClass2. To solve this
you might want to override #readUsing: and #write:using: in Question
to dispatch the reading/writing to other objects/dictionaries/
whatever ...
Hope this helps?
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch