Re: Error in beanshell macro

Dale Anson <[email protected]>
Newsgroups gmane.editors.jedit.user
Message-ID <CAHrA0wC=j_Q29u3QPh6AkbQkwxaaMabJUGqPJvtzu0vw_k=cVg@mail.gmail.com>
I'm on my phone, so short answer... Most likely the API had changed in
recent versions of jEdit.

Hopefully I can respond in more detail later.

Dale



On Aug 18, 2017 6:21 PM, "Jim" <[email protected]> wrote:

About 3 years ago I wrote a beanshell macro to align code around a
character. Like an = sign or a : . I was using Ubuntu but now I am using
Mint 18. I just checked and the macro stills runs fine on Ubuntu 16.04. I
guess today was the first time I had run the macro on Mint 18 and get the
following error:

Sourced file: /home/jfb/.jedit/macros/MyMacros/Columnize_Code.bsh : Error
in method invocation: Method insert( java.lang.String, boolean ) not found
in class'org.gjt.sp.jedit.textarea.JEditTextArea' : at Line: 7 :
 in file: /home/jfb/.jedit/macros/MyMacros/Columnize_Code.bsh
 : textArea .insert ( " " , false )

Here is the whole function:

insertSpaces(numberOfSpaces)
{
  for (i = 0; i < numberOfSpaces; i++)
  {
    textArea.insert(" ", false);
  }
}

Of course there is more to the error message and I can post the whole thing
if needed.

ubuntu 1604:
        jedit = 5.4.0
        java = Sun 1.8.0_121

mint 18:
        jedit = 5.4.0
        java = openjdk 1.8.0_131

The only difference seems to the the java versions. Is there a known
problem with openjdk and jedit?  There doesn't seem to be any other issues
with the openjdk that I see so I would like to avoid installing the Sun
java is possible.

Regards, Jim

------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
-- 
-----------------------------------------------
jEdit Users' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

-- 
-----------------------------------------------
jEdit Users' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.