Author Topic: Object diagrams  (Read 1673 times)

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Object diagrams
« on: October 25, 2007, 11:52:02 am »
How does one get an Object element to show a list of values (as in the EA documentation)?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Object diagrams
« Reply #1 on: October 25, 2007, 11:53:59 am »
Look up Runtime State in the EA Help file.
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: Object diagrams
« Reply #2 on: October 25, 2007, 11:57:31 am »
Thanks, that lets me enter the variables. How do I get them to be displayed?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Object diagrams
« Reply #3 on: October 25, 2007, 12:09:50 pm »
Check the Set Feature Visibility dialog (control-shift-Y with the element selected). Look on the right side, a bit more than half way down.

That's my guess, at least. You might also need to ensure that the feature you've set a run state for has a visibility that is currently displayed. [As in, make sure you aren't setting a run state for a private property, and have disabled display for private features.] I don't know if this matters, but it might.
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: Object diagrams
« Reply #4 on: October 25, 2007, 12:15:37 pm »
I had tried that. I've checked every 'visibility' option, but still no variables. I don't see 'private' anywhere??

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Object diagrams
« Reply #5 on: October 25, 2007, 12:38:46 pm »
On your diagram properties dialog (F5) look at the Features tab.

Also, on the Tools | Options dialog (control-F9) look at the upper right quadrant of the options.

The above done, make sure you are not assigning a run state to a classifier. Run states are only applicable to instances. For example, you do not assign a run state to a class, but to an object.

[Given the problems you've been having with instances in your other ongoing thread, we need to debug the whole instance thing to make run states work for you.]

If the 'object' you are setting the run state for does not have colon before its class name then you've likely got a class instead. Set it to an instance using the context menu as I've explained elsewhere.

David
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: Object diagrams
« Reply #6 on: October 26, 2007, 06:06:02 am »
Thanks, but how do those 'private' options relate to the object I'm drawing, and specifically to the earlier remark "make sure you aren't setting a run state for a private property"?

I am creating an Object diagram with Object elements. Are you saying I need to drag pre-existing Class elements from the Project Browser?

OK, I think I've got it now...

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Object diagrams
« Reply #7 on: October 26, 2007, 07:29:53 am »
Quote
...OK, I think I've got it now...

And did you?

I just want to close the loop, and ensure you're back up to speed.
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: Object diagrams
« Reply #8 on: October 26, 2007, 08:11:20 am »
Yes, thank you.

To recap: the object has to be derived from a specific class. You can't just draw the object and fill in the blanks (as I was assuming).

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Object diagrams
« Reply #9 on: October 26, 2007, 08:42:11 am »
Yes, that's it exactly.

The idea is that the run state shows the current (for purposes of the diagram in question) state of this particular object. This involves specifying values for (some or all of) the object's properties.

In order for us to do this we need to know which properties the object has. This in turn requires us to know which class the object is derived from. We cannot just say "Here's an object, with a value set as 'foo.'" We need to say something like "Here's an instance of the FooBar class, with its CurrentType property set to 'foo.'"

The context is a bit subtle, but it makes all the difference.

David
No, you can't have it!