Book a Demo

Author Topic: "Objects" don't respond to bordercolor default setting  (Read 9461 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
"Objects" don't respond to bordercolor default setting
« on: August 23, 2016, 05:35:04 pm »
If the MDG has metatypes that use the <Apply type="Object">, they don't respond to the bordercolor value in the stereotype definition.  Interestingly, you can't set the border color with the Default Appearance dialog [F4] either!  In the latter case, the option is NOT disabled, so it must be a bug...

Changing the <Apply type="Class">, the functionality is fine.

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: "Objects" don't respond to bordercolor default setting
« Reply #1 on: August 24, 2016, 04:55:27 pm »
Turns out it takes two different criteria to create this bug...  (Yes it's a bug since it ONLY (seems to) affects "objects")

In the Main shape you need to be using darwnativeshape();

and in the (I believe LAST) decoration you need to have se the pen color to something other than getuserbordercolor();

In an object, it seems to draw the native shape border colour AFTER it's drawn the last decoration.  Thus, it uses the current setting of pen colour; whereas in the other types we've used to date, it seems to draw the native shape border colour BEFORE it draws the decoration (since there is no interference).

Oh well, another piece of EAUI.

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: "Objects" don't respond to bordercolor default setting
« Reply #2 on: August 25, 2016, 08:49:35 am »
Just had a look. It actually appears that Class is in the minority with its behavior.

The others that behave like that are:
  • Component (UML 2 notation only)
  • ExpansionNode
  • ObjectNode ie. ends of object flow
  • Pseudo States
  • Synchronization points
  • Others when drawn in rectangle notation.

The good news is that you can "fix" your stereotypes by adding a SetPenColor before your DrawNativeShape.

Code: [Select]
shape main
{
SetPenColor(GetUserBorderColor());
drawnativeshape();
}

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: "Objects" don't respond to bordercolor default setting
« Reply #3 on: August 25, 2016, 09:39:56 am »
Thanks Simon,

I had my suspicions that Object wasn't the only culprit.  And, yes, we'd managed to figure out the work around (I don't consider it a fix) ourselves...  ;)

But it seems to me that Class should be the definitive indicator of what can be done with shapes and that to deviate from that requires a very good conceptually valid reason.

Concistency, konsistency, consistensy! TMUffe - after Paolo

In this case it's better to be consistent with Class (if possible) than to cripple Class.

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