Book a Demo

Author Topic: Strange behavior in shapescript  (Read 3267 times)

Sygnus

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Strange behavior in shapescript
« on: September 29, 2010, 02:18:22 am »
Hi there. Below are two very simple and very similar stereotypes created for our customization, both extending the Object metaclass:

stereotype-> output

shape main
{
      SetFillColor(150,200,255);
      DrawNativeShape();      
}


stereotype-> input

shape main
{
      SetFillColor(80,200,70);
      DrawNativeShape();      
}


The only problem is: the first one displays correctly, a nice blue object.

The second displays only when I create the object with the stereotype.

If I close the diagram and open it again, it reverts to the default shape.

And I've seen the same thing happen with at the least 3 other stereotypes I created, all of which include the DrawNativeShape();      command.

And the strange thing is that in all cases, there are a few stereotypes that work and a few that don't.

Is this related to the name? If so, is there a list of names that should be avoided?

TIA

Marcelo

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Strange behavior in shapescript
« Reply #1 on: September 29, 2010, 09:49:39 am »
Hi Marcelo,

Disable ALL MDG technologies and rename both stereotypes to zoutput and zinput.   That should remove any external influences on the name.

If you are creating them as part of an profile, start by doing all your testing on the names above OUT of the profile so that you have removed any issues associated with that.

The relationship between stereotypes and shapescript activation is very complex particularly where more than one is involved.

In particular, I have previously reported a bug where EA picks the wrong stereotype where there is more than one stereotype with the same name from multiple technologies/profiles.

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