Author Topic: v16β - Shapescript for shape Label doesn't react correctly  (Read 11658 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
v16β - Shapescript for shape Label doesn't react correctly
« on: November 29, 2021, 03:30:34 pm »
We have just discovered that we have an issue with shapescripts that inherit the shape "Label".
In v15.x - following advice from Eve, we abstracted the shape Label from our items so that we could have a standard set of such labels.  For example, we have a label at the centre of the item, another at the southern end etc.  Under v 15.x, the code below operates are desired and will create a label in the "Southern" position of the item (BUT only under non-rectangular form).  The shapescript is inherited by a large number of items (where we wish to have the label default to the southern edge).  It works fine.
Code: [Select]
shape Label   //v2.2 29-Nov-2021   //@S
{
   if(hasproperty("rectanglenotation","0"))   //label only in Icon Form
   {
      setorigin("S",0,0);
//SoF: [[PrIME Naming (Label)]].sub.shp   v1.2   29-Nov-2021
      if(hasproperty("Nm.Prfrrd","1"))
         if(hastag("PreferredName"))
            print("#TAG:PreferredName#");
         else
            printwrapped("?PreferredName Tag - missing!");
      else if(hasproperty("Nm.Nrmtv","1"))
         if(hastag("NormativeName"))
            print("#TAG:NormativeName#");
         else
            printwrapped("?NormativeName Tag - missing!");
      else if(hasproperty("Nm.Abbrvtd","1"))
         if(hastag("AbbreviatedName"))
            print("#TAG:AbbreviatedName#");
         else
            printwrapped("?AbbreviatedName Tag - missing!");
      else if(hasproperty("Nm.Smntc","1"))
         if(hastag("SemanticName"))
            print("#TAG:SemanticName#");
         else
            printwrapped("?SemanticName Tag - missing!");
      else if(hasproperty("Nm.Spcd","1"))
         if(hastag("SpacedName"))
            print("#TAG:SpacedName#");
         else
            printwrapped("?SpacedName Tag - missing!");
      else if(hasproperty("Nm.Adhc1","1"))
         if(hastag("AdHocName1"))
            print("#TAG:AdHocName1#");
         else
            printwrapped("?AdHocName1 Tag - missing!");
      else if(hasproperty("Nm.Adhc2","1"))
         if(hastag("AdHocName2"))
            print("#TAG:AdHocName2#");
         else
            printwrapped("?AdHocName2 Tag - missing!");
      else if(hasproperty("Nm.Archtctr","1"))
         if(hastag("ArchitectureName"))
            print("#TAG:ArchitectureName#");
         else
            printwrapped("?ArchitectureName Tag - missing!");
      else if(hasproperty("Nm.NrmAbb","1"))
         if(hastag("NormativeName"))
         {
            printwrapped("#TAG:NormativeName#");
            if(hastag("AbbreviatedName"))
               print(" (#TAG:AbbreviatedName#)");
            else
               printwrapped(" (?AbbreviatedName Tag - missing!)");
         }
         else
            printwrapped("?NormativeName Tag - missing!");
      else if(hasproperty("Nm.AbbNrm","1"))
         if(hastag("AbbreviatedName"))
         {
            print("#TAG:AbbreviatedName#");
            if(hastag("NormativeName"))
               print(" (#TAG:NormativeName#)");
            else
               printwrapped(" (?NormativeName Tag - missing!)");
         }
         else
            printwrapped("?AbbreviatedName Tag - missing!");
      else if(hasproperty("Nm.Als","1"))
            print ("#Alias#");
      else if(hasproperty("Nm.ActlNm","1"))
         print ("#ActualName#");
      else
         print ("#Name#");
//EoF: [[PrIME Naming (Label)]].sub.shp   v1.2
   }
}      //Shape: Label   //@S
Under v16β, the label is made visible under all circumstances (i.e. both non-rectangular and - anomalously - under rectangular forms).  Other parts of the shapescripts respond correctly to the IsProperty("rectanglenotation","0")) conditional, so we suspect a problem with shape inheritance.

Anyone else seeing this?
Reported,
Paolo
« Last Edit: January 10, 2022, 04:42:44 pm by Paolo F Cantoni »
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: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #1 on: November 29, 2021, 03:58:01 pm »
Curiouser & curiouser!


I changed the inherited script from the one posted in the initial post to:

Code: [Select]

shape Label   //v2.2 29-Nov-2021   //@TEST
{
   if(hasproperty("rectanglenotation","0"))   //label only in Icon Form
   {
      setorigin("S",0,0);
      print ("{[#Name#]}");
   }
}      //Shape: Label   //@TEST
Under v15, we get the expected...  "{[<item name>]}"   (without the bolding and italics).


Under v16β, we get just "<item name>"!    :o >:(    So, there's something definitely "Crook in Tobruk"!!!!    (BTW: same behaviour under 32-bit or 64-bit!)


Paolo
« Last Edit: January 10, 2022, 04:15:41 pm by Paolo F Cantoni »
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: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16RC - Shapescript for shape Label doesn't react correctly
« Reply #2 on: February 07, 2022, 12:21:44 pm »
Still no change under v16RC.  Except, maybe, instead of central, the label has moved to the south.  (I can't remember if it was (correctly) centred under v16β)


Sheesh!


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

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1209
  • Karma: +108/-10
  • Its the results that count
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #3 on: February 08, 2022, 07:39:49 pm »
I've experienced a similar issue with labels where some shapes have two labels one in the shape and one at the south of the shape.
Reported it as a bug as all I'm doing is redefining the ArchiMate elements to add extra tagged values.
Here is the text for the bug;
Quote
We have a custom EA MDG that redefines ArchiMate Elements and adds tagged values. We've found this works fine in V15.2 and earlier however certain elements such as Application Interface, Application Collaboration, Application Interaction, Business Actor, Business Collaboration show two name labels in V16. One label is within the shape as normal and the other appears underneath the shape. It appears to be related to elements that can have a rectangular notation option. However not all elements with rectangular shape options such as business function exhibit the same double label issue.
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #4 on: February 08, 2022, 10:38:22 pm »
I've experienced a similar issue with labels where some shapes have two labels one in the shape and one at the south of the shape.
Reported it as a bug as all I'm doing is redefining the ArchiMate elements to add extra tagged values.
Here is the text for the bug;
Quote
We have a custom EA MDG that redefines ArchiMate Elements and adds tagged values. We've found this works fine in V15.2 and earlier however certain elements such as Application Interface, Application Collaboration, Application Interaction, Business Actor, Business Collaboration show two name labels in V16. One label is within the shape as normal and the other appears underneath the shape. It appears to be related to elements that can have a rectangular notation option. However not all elements with rectangular shape options such as business function exhibit the same double-label issue.
Hi Sunshine,
Thanks for that!  It sure smells very similar.  In our MDG, ALL our vertices have the ability to handle Rectangular Notation.  I've sent a sample MDG and model that illustrates the problem to Sparx since they say they can't reproduce the problem.


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

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1209
  • Karma: +108/-10
  • Its the results that count
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #5 on: February 09, 2022, 06:18:21 am »
#MeToo. Sent sample model of what shapes work ok and what shapes don't so they have some good example to figure it out.
I have a certain sense of Deja vu and have a faint memory of this exact issue a few years back. Might have been with one of the beta version between V9 to 13 but to be honest so far back I can't remember exactly.
Tried checking my emails but I think I must have used my work email and I've left that organisation.
Happy to help
:)

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1209
  • Karma: +108/-10
  • Its the results that count
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #6 on: February 11, 2022, 03:51:46 pm »
Sparx Systems support got back to me today to say;
Quote
We have confirmed that this is an issue and it should be fixed in a future release of EA.
Issue ID: 22019876
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #7 on: February 11, 2022, 05:15:10 pm »
Sparx Systems support got back to me today to say;
Quote
We have confirmed that this is an issue and it should be fixed in a future release of EA.
Issue ID: 22019876
I sent some further info to Sparx today, with some accompanying diagrams, I noted:
Label shape is not responding to the rectangular notation toggle (if(hasproperty("rectanglenotation","0"))) nor the centering statement (setorigin("CENTER",0,0);) under v16.

Also, If I simulate the inheritance in a local stereotype, the problem doesn't exist!

The last statement is interesting since I've maintained all along it was an inheritance issue.  I added the Label script to the top of the main element script and popped it into my shapescript tester (local stereotype) element.  This is because AFAIK, you can't inherit via the local stereotype mechanism.

Hopefully, Sparx put some priority on this as we can't release v16 for general use without it.

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

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1209
  • Karma: +108/-10
  • Its the results that count
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #8 on: February 12, 2022, 08:12:26 am »
...Hopefully, Sparx put some priority on this as we can't release v16 for general use without it.
Ditto
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #9 on: April 22, 2022, 10:53:21 am »
...Hopefully, Sparx put some priority on this as we can't release v16 for general use without it.
Ditto
Well, looks like the v16.0 official release (1604) hasn't fixed the problem. 

Sunshine are you also able to confirm the problem still exists?

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

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1209
  • Karma: +108/-10
  • Its the results that count
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #10 on: April 23, 2022, 09:40:50 am »
Confirm its not been fixed. I'm surprised to be honest as they've taken so long to release V16 I thought they would have fixed that. That bug will prevent my organisation from upgrading as we use and MDG to extend ArchiMate. What is interesting is that the extra label doesn't appear on all archimate extended objects so it points to some inconsitent coding.
Very dissapointed this hasn't been fix.
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #11 on: April 23, 2022, 10:16:47 am »
Confirm it's not been fixed. I'm surprised, to be honest as they've taken so long to release V16 I thought they would have fixed that. That bug will prevent my organisation from upgrading as we use an MDG to extend ArchiMate. What is interesting is that the extra label doesn't appear on all ArchiMate extended objects so it points to some inconsistent coding.
Very disappointed this hasn't been fixed.
(my emphasis)
You said it!  I thought I had given sufficient information for the problem to be tracked down and eliminated (unless, like the VCE problem, there's a fundamental design problem).

I would've thought getting inheritance correct in this area would be crucial for making EA more flexible AND CONSISTENT!

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: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16 - Shapescript for shape Label doesn't react correctly
« Reply #12 on: May 03, 2022, 12:43:45 pm »
Confirm it's not been fixed. I'm surprised, to be honest as they've taken so long to release V16 I thought they would have fixed that. That bug will prevent my organisation from upgrading as we use an MDG to extend ArchiMate. What is interesting is that the extra label doesn't appear on all ArchiMate extended objects so it points to some inconsistent coding.
Very disappointed this hasn't been fixed.
(my emphasis)
You said it!  I thought I had given sufficient information for the problem to be tracked down and eliminated (unless, like the VCE problem, there's a fundamental design problem).

I would've thought getting inheritance correct in this area would be crucial for making EA more flexible AND CONSISTENT!

Paolo
Sparxians,
Is this recognised as a defect?  If so, will it be rectified?  It DOES seem to point to a serious problem in the background.


Paolo
« Last Edit: May 17, 2022, 10:42:19 am by Paolo F Cantoni »
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: 8227
  • Karma: +233/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #13 on: May 17, 2022, 10:41:10 am »
I received the following official response from Sparx:

"This issue has been fixed, and the change has been merged for the next release. Unfortunately, I cannot provide a release date at this stage."

Let's hope it is released soon!

Paolo
« Last Edit: May 17, 2022, 10:42:44 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1209
  • Karma: +108/-10
  • Its the results that count
    • View Profile
Re: v16β - Shapescript for shape Label doesn't react correctly
« Reply #14 on: May 17, 2022, 07:38:57 pm »
I received the following official response from Sparx:

"This issue has been fixed, and the change has been merged for the next release. Unfortunately, I cannot provide a release date at this stage."

Let's hope it is released soon!

Paolo
hallelujah, hallelujah
https://www.youtube.com/watch?v=LRP8d7hhpoQ&feature=youtu.be
Happy to help
:)