Book a Demo

Author Topic: How to actually apply a shape script?  (Read 13249 times)

Kimi

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
How to actually apply a shape script?
« on: June 07, 2012, 11:38:37 pm »
Hello all
I was trying to use a shape script for a stereotype. I went through all the steps given in the online help. But it does not work.
I have a stereotype defined, I can see a preview of my shape (black background and a line of text containing the element's name) and I can select the stereotype for the diagram element. The stereotype is then apparently correctly selected, stereotype and name are shown in the element in the diagram, but it still looks like the base class.
So what do I have to do, to have the shape script actually override the default appearance?

Also, I can fill a "screen" within a user interface diagram with a color, but the same does not work for any other element put insinde the screen. Is that intended? Or is my project broken?

Greetings
Michael
« Last Edit: June 08, 2012, 12:06:38 am by MichaelKitz »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to actually apply a shape script?
« Reply #1 on: June 09, 2012, 12:58:46 am »
It might be that the stereotype is already used by a MDG. Try out with a different name first.

No idea regarding the UI element (have never used them).

q.

adoo

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
« Last Edit: June 11, 2012, 10:32:49 pm by gariane »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to actually apply a shape script?
« Reply #3 on: June 12, 2012, 09:24:59 am »
Quote
It might be that the stereotype is already used by a MDG. Try out with a different name first.
Good advice. Also, try your shape script with a different base class - you don't say what base class you are extending, but it may not have the ability to use shape scripts. [Try "Class", or "Association" if it's a connector.]
« Last Edit: June 12, 2012, 03:39:24 pm by KP »
The Sparx Team
[email protected]

Kimi

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: How to actually apply a shape script?
« Reply #4 on: June 22, 2012, 09:10:04 pm »
Thanks for the advice. It is now working, but I cannot say for sure what made the difference.
Maybe it is the fact that at first I tried to change the base class' properties and now I work with a new stereotype and an extended metaclass.

Just one thing remains: Is it true that I cannot change the text color in the shape script, but I can change it in individual elements? I am using a label stereotyped as TextArea, which I defined to extend the GUIElement class. I now have the TextArea being transparent by default and showing the label's name. Unfortunately my background color is black, which does not go too well with black as default text color.  :(

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to actually apply a shape script?
« Reply #5 on: June 22, 2012, 09:14:31 pm »
I guess you're right. At least I also have not seen such a feature. However, you are free to send in a feature request.

q.