![]() |
Ports |
Post Reply
|
| Author | |
salking
Member
Joined: 14.Apr.2008 Location: USA Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: PortsPosted: 14.Apr.2008 at 19:53 |
|
I'm using the MetaEdit evaluation tutorial. In section 4.2 "Adding representational precision with ports" while drawing the relationships I receive the error "you cannot create a relationship between 2 males and female starting from a male with those ports." There doesn't seem to be a quick way to verify the port definitions. I used the "graph tool" to reveiw "types" and "bindings" settings and they looked good (matched what example was expecting). I used the "object tool" to verify ports on symbol were correct. Any suggestions would be appreciated.
|
|
![]() |
|
stevek
MetaCase
Joined: 11.Mar.2008 Points: 643 |
Post Options
Thanks(0)
Quote Reply
Posted: 14.Apr.2008 at 23:07 |
|
With tutorials, it's always a little hard to guess what might have gone wrong - hard for you and for me! The key things to check would be these (you've already mentioned 2 and 3, but double-checking against the information here would be sensible):
If that doesn't help, maybe you could export your diagram and post it here? From the Diagram Editor choose Graph | Export To... | MetaEdit+ Patch File - it will probably give a couple of warnings which you can ignore, and will ask for a name for the repository (e.g. salking), and for the file (e.g. salking.mec). You can upload and attach a file to a post with the zip icon in the full posting editor (the Quick Reply field only has the most basic toolbar buttons; click the diagonal arrow button on its toolbar to get the full editor). Edited by ForumDBA - 13.Nov.2019 at 12:53 |
|
![]() |
|
salking
Member
Joined: 14.Apr.2008 Location: USA Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 15.Apr.2008 at 19:39 |
![]() |
|
stevek
MetaCase
Joined: 11.Mar.2008 Points: 643 |
Post Options
Thanks(0)
Quote Reply
Posted: 16.Apr.2008 at 00:27 |
|
Thanks for your perseverance! The problem was in the ordering of connections. In the metamodel you had Female in the first role, then Male then the Child. When you were drawing the relationship, you were presumably trying from Male. If you click the Female first, then the Male, then the Child, it works fine. In the Evaluation Tutorial, the order given is Male, Female, Child, for both metamodel (as in Fig 4-13) and model (although I suppose people who read right to left could get that back to front).
By default, MetaEdit+ has a setting for relationship creation called "First object always in first role". This requires the first object selected in a model to be of the first type in the binding definition in the metamodel. That's why the error message you saw ended with "...starting from a Male". If you turn the setting off (Repository | Options | Preferences page), MetaEdit+ will allow the modeler to be more lax in the selection order: it will try all possible orderings of the objects selected. However, that's not always a good idea: for instance, if you're drawing an inheritance relationship in a class diagram, and you drag from the subclass to the superclass, MetaEdit+ will then have to offer you a dialog asking whether you wanted the first class to be the subclass or the other way around.
You could also improve the Family Tree language to allow either parent to be chosen first: rather than correct your current binding, just add a new similar binding but with Male first. We could do that in the tutorial, but we're trying to keep things simple.
Thanks very much for your feedback: we'll now be able to help others avoid this by making it clearer in the text that you have to use the same order in the model as in the metamodel.
By the way, I spotted something else in your metamodel that's not quite right: you have the cardinality for Child set to 1..N, rather than 0..N as shown in Fig 4-13.
|
|
![]() |
|
salking
Member
Joined: 14.Apr.2008 Location: USA Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 16.Apr.2008 at 04:34 |
|
Thanks for your rapid response!
|
|
![]() |
|
Post Reply
|
|
| Tweet |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |