fmorbini / scxmlgui

A graphical user interface for editing SCXML finite state machines.
Other
104 stars 37 forks source link

<script> element under top level incorrectly removed #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The SCXML spec allows for a single <script> element that is a child of <scxml>. 
 The script gets evaluated at document load time.
http://www.w3.org/TR/scxml/#script

scxmlgui forcibly removes these from any document that contains them.  There is 
also no way to add one in the GUI.

To reproduce:
1. Add <script src="foo.js"/> under <scxml> using a text editor and save.
2. Open scxml file in scxmlgui.
3. Save scxml file in scxmlgui.

Expected:
the <script src="foo.js"/> element is still under <scxml>.

Actual results:
the <script src="foo.js"/> element is missing.

I'm using SVN r175 (2013-01-15)

I suggest leaving any existing <script> element under <scxml> intact as a 
simple initial fix, and add a way to change it in the GUI at a later stage.

Steve

Original issue reported on code.google.com by sbryant....@googlemail.com on 17 Jan 2013 at 3:52

GoogleCodeExporter commented 9 years ago
can you please attach a sample scxml that shows the problem?

i think the script element was not in the working draft at the time the editor 
was first built.

thanks

Original comment by fmorbini on 17 Jan 2013 at 5:03

GoogleCodeExporter commented 9 years ago
Added a very simple test scxml file.  Ignore layout when loading (as there is 
none)!

Given that the last call period ended on 2013-01-11, so I'm hoping the draft 
will become stable now.

Steve

Original comment by sbryant....@googlemail.com on 18 Jan 2013 at 9:52

Attachments:

GoogleCodeExporter commented 9 years ago
Please elevate this to High priority; this is about to force me to stop using 
your lovely editor :/

Original comment by Phrog...@gmail.com on 15 Feb 2013 at 4:12

GoogleCodeExporter commented 9 years ago
please try r181. i added a generic editing support for additional unknown 
content attached to a node. You'll see a new "Other" tab in the editing box for 
a node.

Original comment by fmorbini on 15 Feb 2013 at 5:21

GoogleCodeExporter commented 9 years ago
The workaround is quite useable for me!

Thanks very much for that,

Steve

Original comment by sbryant....@googlemail.com on 18 Feb 2013 at 8:57

GoogleCodeExporter commented 9 years ago

Original comment by fmorbini on 7 Mar 2013 at 6:56