Apache OpenOffice (AOO) Bugzilla – Issue 70176
Unable to edit a JavaScript script with syntax error
Last modified: 2017-05-20 11:27:48 UTC
Steps to reproduce: 1 - create a new Writer document, save it. 2 - create a new JavaScript script. 3 - Open the Rhino editor and introduce a syntax error, for example add this line: a:= 1; 4 - close the Rhino editor, save the document. 5 - try to edit again the script: * message : syntax error at line xxx * the editor opens with a blank screen. Your code is no more accessible!
Jürgen, please find the right developer for this issue in the Scripting Framework
jsc -> ab: seems to be one for the scripting framework
2.x, STARTED
basic and scripting issues now should be assigned to component "scripting"
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Start up OOo writer Open JavaScript Rhino Debugger 1.Click on Tools > Marcros > Organize Marcros > JavaScript 2.On the JavaScript Macros panel, click to select My Macros, and then click on Create… 3.In the Create Library window, type in a name to create a libary. ie. myTestLib, and click Ok. 4.Expand My Macros, and click to select the library, myTestLib, you just created. Click on Create… Enter a name for your JavaScript program, ie, myTestJS, and click Ok. 5.Next select the JS program that you just created, and click on Edit. 6.A “Hello World” sample program is displayed. You can either write your own testing JavaScript program or use it for testing. 7.In the body of the program, insert a syntactically wrong statement, ie, println(“I am here”); Click File > Save 8.Click File > Exit to get out of the Debugger. Next time when you open the same JavaScript program for editing, a syntax error message is displayed showing the line number of the wrong statement. For example, Error Compile File Vnd.sun.star.expand:${$SYSBINDIR/bootstrap.ini::UserInstallation}/user/Scripts/ javascript/mytestlib/myTestJS.js/ucb/, line 14: syntax error The Debugger screen becomes blank, and the entire program is stuck. New discovery: In between step 6 and 7 above, try to compile and run the program. When there is no syntax error, impose an error, ie, adding the println line in line 14. Save and run this new program, the syntax error message will be prompted. Click Ok, and File > Exit to exit the program. When we re-open the program, this error message will appear if we click run, but the program will NOT disappear. It is still clickable and editable.
The above testing was run with OpenOffice.org V2.3.1 on Intel Windows XP, Service Pack II.
Currently no high priority -> OOo Later
Reset assigne to the default "issues@openoffice.apache.org".