Book a Demo

Author Topic: 1301: Shapescript: MiddleBottomLabel not always enforced.  (Read 6002 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
1301: Shapescript: MiddleBottomLabel not always enforced.
« on: June 30, 2016, 10:02:40 am »
We have arc shapescripts that hidelabel("MiddleBottomLabel");.  Our repository holds arcs that might have been created over 5 years ago.  We noticed that if we draw a new arc, it suppresses MiddleBottomLabel (where the stereotype is normally displayed).  Also, it stops the user trying to MiddleBottomLabel visible.  (Not optimal, but understandable)

However, for some preexisting arcs, MiddleBottomLabel stubbornly refused to be suppressed!  We discovered that the ones that were inconsistent seemed to be mainly Tree view line style.

We also discovered that we could suppress MiddleBottomLabel by switching the style to Direct, then back to Tree View.  This clearly points to a defect.

Reported,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: 1301: Shapescript: MiddleBottomLabel not always enforced.
« Reply #1 on: June 30, 2016, 03:53:47 pm »
So I've done some testing and investigation and I've found the issue!  :D

In the past, the shapescript allowed the stereotype (MiddleBottomLabel) to be visible - so the geometry was stored in t_diagramlinks.Geometry as HDN=0.  The new shapescript suppresses the stereotype and so stores the geometry as HDN=1 (for new lines).

Converting from one to the other will make the stereotype visible/not visible.

NOTE: I said stereotype and not MiddleBottomLabel - since the value int_connector for Middle bottom label is ignored (once set - or even missing)

So the defect is that (since for new lines) you can't change whatever the shapescript says - this should also be true for old lines and the value for HDN in t_diagramlinks.Geometry should be ignored.

I've asked Sparx to confirm that the value of MiddleBottomLabel  in t_connector is not used after the creation of the connector?

BTW: I checked Thomas Kilian's excellent "Inside EA" eBook - where the answer was all the time (see t_diagramlinks section) - if I'd been able to guess where to look.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!