Hi Cyrille,
The problem is not with MooseGroups but with the way you want to use
FMMultivalueLink. These links have side effects to ensure that the
opposite is maintained correctly when you set only one part of the
relationship. However, the problem is that if you copy such a link
object, you will get a copy of the collection, but the pointers to the
owner and opposite is still the same, so you will have side effects due.
I would suggest to work with these either through the groups or by
converting to OrderedCollection. Instead of aClass methods, use either:
- aClass methodsGroup
- aClass methods asOrderedCollection
Cheers,
Doru
On 19 Aug 2010, at 14:11, Cyrille Delaunay wrote:
Hello,
I got some problems by concatenating some mooseGroups together.
You can evaluate this script in a workspace (it correspond to what I
did in my code):
|mooseModel|
Transcript open.
MooseScripts createLightModelForLAN.
mooseModel := MooseModel root allModels detect: [:aMooseModel |
aMooseModel name ='lightLAN'].
"at the begening, all famixClasses from this model have methods"
Transcript show: (mooseModel allModelClasses select: [:each |
each methods isEmpty]) size asString, String cr.
"here we do several concatenations with methods from all
FAMIXClasses:"
mooseModel allModelClasses do: [:aFamixClass |
aFamixClass methods , aFamixClass inheritedMethods
].
"let see the new result: "
Transcript show: (mooseModel allModelClasses select: [:each |
each methods isEmpty]) size asString, String cr.
You can see that after the concatenations, some FAMIXClasses have
lost their methods.
Is it a real problem or is it me that is missing something obvious?
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Value is always contextual."