Behaviour Tutorial not working
Hi folks,
I'm a computer science student and I'm studying MPS through your screen-cast video.
I'm watching this video and I'm trying to implement the example behaviour (clear the false branch). When I rebuilt the language and I create a new "IfStatement" nothing happens, seems that is not working.
Someone can help me ?
Thank you in advance.
Andrea
Please sign in to leave a comment.
Hi Andrea,
the clear functionality in the video also has no observable effect, since the "foo()" method on the IfStatement is never called. You would have to create an intention or an action that call the "foo()" method when the user initiates them somehow, which is not shown in the video. It only serves the purpose of showing that you can define and call behavior methods.
BTW, I recommend the Fast Track Tutorial as the best way to learn the fundamentals of MPS - https://confluence.jetbrains.com/display/MPSD20183/Fast+Track+to+MPS
Vaclav
Hi,
first of all, thank you very much for the quick response.
Now I understood, this was not clear to me. I will create an action or an intention and call the method, in order to make it works (the clear method should hide the false branch, right?).
I "arrived" to the video from the Fast Track Tutorial: I'm studying it.
Andrea
Yes, the statements in the "else" branch should be removed from the model and as a result of that the "else" branch will hide.
Vaclav
I am learning MPS by myself too. I suggest you watch Markus Voelter's tutorial after this one. It's the best MPS teaching content available on the internet.