Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] How to add children to a model element?
[QVTO] How to add children to a model element? [message #462434] Sun, 02 August 2009 14:37 Go to next message
Eclipse UserFriend
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
Re: [QVTO] How to add children to a model element? [message #462528 is a reply to message #462434] Sun, 02 August 2009 14:49 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I got it. Sorry, but I ignored the OrderedSet elements belonging to my
metamodel. I always only looked at the general methods like allSubobjects().
Previous Topic:Problem in Tuple type
Next Topic:[QVTO] global variables
Goto Forum:
  


Current Time: Sat Apr 27 00:31:31 GMT 2024

Powered by FUDForum. Page generated in 0.02964 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top