Book a Demo

Author Topic: Hidelabel fails for reflexive relationships  (Read 5905 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Hidelabel fails for reflexive relationships
« on: May 22, 2012, 03:33:42 pm »
If a shape script is set up to hide labels, and functions correctly for non-reflexive relationships; it will fail for reflexive relationships.

This is because the labels are different on reflxive relationships than on non-reflexive.

There is NO mechansm to determine within a shapescript if the arc is refelxive or not.

EAUI all round...

Reported,
Paolo
« Last Edit: May 22, 2012, 03:34:10 pm by PaoloFCantoni »
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: Hidelabel fails for reflexive relationships
« Reply #1 on: May 23, 2012, 08:21:55 am »
I'd strongly recommend against using hidelabel at all as the effect persists even if hidelabel is no longer called (eg. stereotype removed)

Instead override the label and print an empty string. Hiding the label in this way will work for reflexive relationships and doesn't have any known negative repercussions.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hidelabel fails for reflexive relationships
« Reply #2 on: May 23, 2012, 11:51:18 am »
Quote
I'd strongly recommend against using hidelabel at all as the effect persists even if hidelabel is no longer called (eg. stereotype removed)

Instead override the label and print an empty string. Hiding the label in this way will work for reflexive relationships and doesn't have any known negative repercussions.
I understand what you're saying, but which label do I override?  The one for the non-reflexive setting or the one for the reflexive one - since the same information appears in different labels depending upon the reflexiveness.

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: Hidelabel fails for reflexive relationships
« Reply #3 on: May 23, 2012, 03:54:28 pm »
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hidelabel fails for reflexive relationships
« Reply #4 on: May 24, 2012, 11:54:02 am »
Quote
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.
As far as I can see Simon, you're not understanding what I'm saying (or perhaps asking):  the stereotype appears in label "Middle Bottom Label" (as reported using: <Context menu> |Visibility >Set Label Visibility...) for an non-reflexive and in "Middle Top Label" for a reflexive relationship. So, if I want to suppress the stereotype, which label do I use in the shape script?

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: Hidelabel fails for reflexive relationships
« Reply #5 on: May 24, 2012, 12:48:59 pm »
No... I understand exactly, and you haven't tried what I suggested.

Just add
Code: [Select]
shape middlebottomlabel
{
      print ("");
}

to a shape scripted connector. Move it around between objects including so that it's reflexive. It works.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hidelabel fails for reflexive relationships
« Reply #6 on: May 24, 2012, 01:39:46 pm »
Quote
No... I understand exactly, and you haven't tried what I suggested.

Just add
Code: [Select]
shape middlebottomlabel
{
      print ("");
}

to a shape scripted connector. Move it around between objects including so that it's reflexive. It works.
It's pistols at dawn!  :P

Nowhere, until now, did you explicitly say: use the label applicable to the non-reflexive relationship and it will automatically apply to  the reflexive one.  If you did, please indicate.

I'll give it a try and confirm back...

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: Hidelabel fails for reflexive relationships
« Reply #7 on: May 24, 2012, 01:48:35 pm »
Pistols at dawn? Does that mean I have a 3 hour headstart?

Quote
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hidelabel fails for reflexive relationships
« Reply #8 on: May 25, 2012, 01:23:19 pm »
Quote
Pistols at dawn? Does that mean I have a 3 hour headstart?

Quote
As soon as you override any label in a shape script the labels operate the same for reflexive and non-reflexive.
Sorry, that's not explicit enough.  As you know by now, I'm pretty much of a literalist.  The above statement just says they operate the same, but it doesn't say which one to override.  In fact, if one were to analyse the order of terms, one would be forgiven for assuming the reflexive label shoudl eb the one to be used.

My point about dawn is pertinent - I didn't specify which dawn...   :-*

Have a good weekend,
Paolo

[edit]Confirmed that creating the additional shapes and printing empty strings for the non-reflexive labels carries over into the reflexive ones.[/edit]
« Last Edit: May 29, 2012, 04:07:04 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!