Book a Demo

Author Topic: Ghost element connections  (Read 7007 times)

djdejong

  • EA User
  • **
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Ghost element connections
« on: December 14, 2016, 06:43:22 am »
After deleting an element from my diagram -- but still having it in the Project Browser -- it still seems to retain Links to other elements in the diagram. This causes issues for the script I'm developing since it uses said links when going through the diagram.

Is it therefore necessary to delete these elements from the project browser? How can elements be deleted from the diagram in a way that ensures they are unlinked from those still in the diagram? It doesn't make sense to me that an element would retain its links when it's graphically removed from the model.
« Last Edit: December 14, 2016, 06:46:53 am by djdejong »

djdejong

  • EA User
  • **
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: Ghost element connections
« Reply #1 on: December 14, 2016, 06:54:42 am »
After some playing around I think I discovered the answer:

If you delete an element with connections to other elements directly (selecting that element and deleting it), it will retain those connections in its Links table despite being removed from the diagram.

However, if you first delete its associated connectors, THEN delete the element, it will have an empty Links table.

I suppose it's like this for the convenience of removing an element, then bringing it back and having it automatically restore its connectors. I still think it should remove the Links in both cases though...

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Ghost element connections
« Reply #2 on: December 14, 2016, 08:54:08 am »
If you remove an object from a diagram you are not removing it (or any relationships that it has) from the model.

You'll find discussions started by other users who made a similar conceptual mistake, along with a lot of answers stating that the diagram is not the model.

djdejong

  • EA User
  • **
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: Ghost element connections
« Reply #3 on: December 14, 2016, 09:55:53 am »
"If you remove an object from a diagram you are not removing it (or any relationships that it has) from the model."
Perhaps if you define "object" as those contained in the diagramObjects table.  But connectors deleted from the diagram, as I commented, do in fact change the properties of the element's "Link" table, which I would interpret as changing relationships within the model (and more than just the diagram).  I don't think I've had any difficult understanding the the model and digram are not identical.

djdejong

  • EA User
  • **
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: Ghost element connections
« Reply #4 on: December 14, 2016, 10:00:21 am »
Basically I was just confused about how to properly both remove an element from a diagram and its relationships from the model, which I figured out  :)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Ghost element connections
« Reply #5 on: December 14, 2016, 10:32:27 am »
But connectors deleted from the diagram, as I commented, do in fact change the properties of the element's "Link" table, which I would interpret as changing relationships within the model (and more than just the diagram).
This is how I set up my environment...

ribbon: Start | Workspace | Preferences | Links | Prompt on connector deletes => ON

Then select a connector and press DELETE. In the Remove Connector dialog, select "Hide the connector" and "Don't ask again" and click OK. From now on, if you DELETE a connector, it will be removed from the diagram but will still exist in the model; if you CTRL+DELETE a connector, it will be removed from the diagram AND the model. In other words, the named keyboard shortcuts will behave the same for connectors and diagram objects.


« Last Edit: December 14, 2016, 02:21:50 pm by KP »
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Ghost element connections
« Reply #6 on: December 14, 2016, 11:33:03 am »
The way EA interprets Del, Ctrl-Del, Ctrl-D varies in many flavors and contexts (browser, diagrams, different dialogs). Sparx will call this tasty, I guess. I call it EAUI: EA Unique Interface.

q.

djdejong

  • EA User
  • **
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: Ghost element connections
« Reply #7 on: December 23, 2016, 09:30:54 am »
Good to know. I think I'm set up the same as KP.