openoffice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <>
Subject Re: calc BeanShell script save gives "error saving script" window.
Date Sun, 03 Mar 2013 16:01:29 GMT
On Sun, Mar 03, 2013 at 08:57:49AM -0600, Larry Evans wrote:
> and the calc window opened.  I then put macros security at medium, and then
> loaded the attached .ods file, and then created a macro containing the
> previously attached NumberFive.bsh. I was able to save it this time;
> however,
> when I tried to run it, I got an Error window with a pink octagon and red
> X and the message:
>    Sourced file: inline evaluation of : ``import
>; import;
> i...": Not an array
> So obviously it's not interpreting the file as java.  I've again attached
> the file.  What am I doing wrong?

Are you running the macro from "Tools" - "Macros" - "Run Macro..." / "Tools"
- "Macros" - "Organize macros" - "BeanShell..." - "Run"? or are you
running the macro from the "editor"?

If from the editor, try putting debug(); at the top of the editor, to
see what's happening (I guess a null pointer exception), remove debug();
before storing the file.

This file as a macro that runs fine:

The ODS you attached on the other mail has code that work only with

xTextDoc = (XTextDocument)
xText = xTextDoc.getText();
xTextRange = xText.getEnd();
xTextRange.setString( "Hello World (in BeanShell)" );

Ariel Constenla-Haile
La Plata, Argentina

View raw message