[QVTO] How to add children to a model element? [message #462434] |
Sun, 02 August 2009 14:37 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: formatzeh.gmx.de
I created my own metamodel and now I want to do some m2m transforamtions
for the instances. For example an element of Type "View" can have some
children of type "ViewTransition". How do I do this? My try was the
following:
mapping CMM::Layout::addView(inout layoutModel : CMM::NavigationModel) :
CMM::View
{
result.name := self.name + "View";
result.layout := self;
result.allSubobjects() += object ViewTransition{};
}
But this doesn't work because I get the following error message:
Cannot assign to this expression since it is not an lvalue
But I don't know what this message means. What is an lvalue and how do I
add some children?
best regards
Gilbert
|
|
|
|
Powered by
FUDForum. Page generated in 0.03079 seconds