Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Geert Bellekens on January 17, 2008, 12:15:31 am

Title: Object attributes unreachable
Post by: Geert Bellekens on January 17, 2008, 12:15:31 am
I have noticed some weird behaviour in EA regarding object diagram.
Follow the following steps
- Create Class "Class1"
- add attribute to Class1 "ClassAtt"
- Create object diagram
- Create object on the object diagram "object1"
- Add attribute to object1 "ObjectAtt"
- set the classifier of object1 to Class1
- Try to edit ObjectAtt

There seems to be no way to edit the attribute of the object. I only get the dialog for the attributes of the class. I also haven't found a way to break the link between the object and the class.
Does anyone have a solution for this?
Title: Re: Object attributes unreachable
Post by: Martin Terreni on January 17, 2008, 03:42:45 am
How can you add an attribute to an object? an object is a run time enity ???
Title: Re: Object attributes unreachable
Post by: Geert Bellekens on January 17, 2008, 05:14:50 am
It is possible in EA.
The reason I did was following. According to our methodology we need to be able to produce "snapshot" diagrams to illustrate a class diagram.
So if the class "Person" has attributes "Name" and "Gender", they would like to see a diagram with an object
Person
Name: "Mitch"
Gender: "Male"

To be able to produce such a diagram I would like to use an object diagram. The problem is that if I would create an instance of person on this diagram I can only show the attributes defined in Person. So I cannot visualize the values "Mitch" and "Male".
In trying to find a workaround I created a new object without a classifier. That allows me to (re)create the attributes Name and Gender and visualize the values "Mitch" and "Male" as initial values.
The problem I'm having is that I cannot relate the classifier "Person" with the Object person because then I cannot edit my object attributes anymore.
Title: Re: Object attributes unreachable
Post by: «Midnight» on January 17, 2008, 06:21:14 am
Look up Run State in help.
Title: Re: Object attributes unreachable
Post by: Geert Bellekens on January 20, 2008, 11:58:08 pm
Yes! That was exaclty what I was looking for.
They might have put that option in a more obvious location though.
Thanks very much!