Book a Demo

Author Topic: Allow shapescripts to call common code  (Read 4878 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Allow shapescripts to call common code
« on: September 04, 2015, 06:23:53 pm »
As we are creating our new MDG shapescripts, which provide MUCH enhanced surfacing of item properties onto the diagram, we're build Aspect Oriented Shapescripts ©) :)

However, because we want to make our vertices and arcs respond CONSISTENTLY to the underlying properties, we find we are DUPLICATING code in each shapescript. This is, naturally, a maintenance nightmare!  Particularly so, given the opacity of the MDG generation and error reporting process.

It would be REALLY COOL if shapescripts could call standard segments of code as subroutines.  One quick and dirty way would be to create synthetic "stereotypes" which would contain the shapescript code to be executed.

What do others think?

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Allow shapescripts to call common code
« Reply #1 on: September 04, 2015, 06:49:35 pm »
I'd love that

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Allow shapescripts to call common code
« Reply #2 on: September 04, 2015, 06:53:01 pm »
Shape script is so poor in its capabilities that it even lacks simple string operations. And you want common code? 10 steps too far...

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Allow shapescripts to call common code
« Reply #3 on: September 07, 2015, 09:48:00 am »
Quote
Shape script is so poor in its capabilities that it even lacks simple string operations. And you want common code? 10 steps too far...

q.
Don't get me wrong!  I'd have string operations too..  But most of the componentry for common code appears already there...  You can call subroutine within your own shape script, just add an: else check globally.

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

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Allow shapescripts to call common code
« Reply #4 on: September 07, 2015, 10:41:45 pm »
+1