Author Topic: Can you use !INC in a scriptlet?  (Read 7498 times)

steverumsby

  • EA User
  • **
  • Posts: 27
  • Karma: +3/-0
    • View Profile
Can you use !INC in a scriptlet?
« on: September 07, 2022, 06:46:03 pm »
I have some diagram scripts (Javascript) that work quite nicely and (now) quickly enough that I thought it would be useful to convert them to scriptlets (EA 16). However, when I do that I get errors on the !INC lines of my code. Is it not possible to include library files into a scriplet? If true, that makes them a whole lot less useful. Or am I doing something wrong?

Steve.

steverumsby

  • EA User
  • **
  • Posts: 27
  • Karma: +3/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #1 on: September 12, 2022, 07:13:21 pm »
Reply from Sparx support - no you can't, but we'll record it as a feature request for future consideration.

Just in case anybody else trips over this...

Steve.

JoNijsen

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #2 on: February 06, 2024, 10:25:54 pm »
In 16.1.1628 !INC can be used in scriptlets but I found that the scriptlet is not stopped at the end of the script, which causes an error the subsequent times the scriptlet is run

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13227
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Can you use !INC in a scriptlet?
« Reply #3 on: February 06, 2024, 10:34:48 pm »
In 16.1.1628 !INC can be used in scriptlets but I found that the scriptlet is not stopped at the end of the script, which causes an error the subsequent times the scriptlet is run
what do you mean by "is not stopped at the end of the script"?

Geert

steverumsby

  • EA User
  • **
  • Posts: 27
  • Karma: +3/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #4 on: February 15, 2024, 09:29:16 pm »
In 16.1.1628 !INC can be used in scriptlets but I found that the scriptlet is not stopped at the end of the script, which causes an error the subsequent times the scriptlet is run
I've been using !INC in scriptlets since it became possible and I've never noticed this problem. What do you mean by "the scriptlet is not stopped"? What are the symptoms?

JoNijsen

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #5 on: April 22, 2024, 02:59:18 am »
In the context menu of the scriplet the run option is no longer enabled.
And the second time I run it (manually or reload diagram ) it crashes EA, sometimes EA closes completely

MichPaule

  • EA User
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #6 on: July 11, 2024, 12:08:52 am »
In 16.1.1628 !INC can be used in scriptlets but I found that the scriptlet is not stopped at the end of the script, which causes an error the subsequent times the scriptlet is run
I can confirm that the script in the scriptlet is not stopped properly.
This is unrelated to !INC as I don't have that in my script.
After opening a diagram the script executed and the "Stop Script" context menu command remains active.
When clicked it stops the script and gets disabled (grayed).
If I click "Run Scriptlets" before stopping the script manually I'm getting an error like e.g. "redeclaration of let " which is to be expected in case of a still running script.
Looks the scriptlets feature needs some rework  :-[

MichPaule

  • EA User
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #7 on: July 19, 2024, 03:59:51 pm »
Just FYI:
Bug report is out (#24077893)
Let's see what they have to say...

MichPaule

  • EA User
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #8 on: September 12, 2024, 03:38:36 pm »
Just FYI:
Bug report is out (#24077893)
Let's see what they have to say...
Update:
The issue has been confirmed and will be investigated further by our development team.
 ;)

JoNijsen

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Can you use !INC in a scriptlet?
« Reply #9 on: December 02, 2024, 09:49:02 pm »
In 16.1.1628 !INC can be used in scriptlets but I found that the scriptlet is not stopped at the end of the script, which causes an error the subsequent times the scriptlet is run
what do you mean by "is not stopped at the end of the script"?

Geert

I mean that EA thinks the script is still running