Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining aspell dictionary? #1

Open
NinaMargrethe opened this issue Jul 10, 2015 · 0 comments
Open

Defining aspell dictionary? #1

NinaMargrethe opened this issue Jul 10, 2015 · 0 comments

Comments

@NinaMargrethe
Copy link

Hi! First I must apologize if this is not a good way to contact you. I hope you can help me anyway. :)

Edited this issue, to not create a lot of issues.

I am getting a NullPointerException on

SpellChecker.checkCurrent() :217
SpellChecker.check() : 251
SpellChecker.checkSpell() : 148, 143
MessageModel.getMessage() : 1162

My MessageModel.getMessage() looks like this:

public Message getMessage(){
   if(message.getText()!=null && !message.getText().equals("")) {
        checker.checkSpell(message.getText());
    }
     return message;
}

And I define my dictionary like this:

private SpellDictionary dict;
private final SpellChecker checker = new SpellChecker(dict);
private void initDict() {
    try {
        dict = new OpenOfficeSpellDictionary(new ZipFile("aspell-nb-0.50.1-0.tar.bz2"));
    } catch (Exception e) {
        log.debug(e);
    }
}

I am wondering if it may be something wrong with initiating the dictionary that gives the NullPointerException, as I tried

checker.checkSpell("Hei foo");

with the same result.

@NinaMargrethe NinaMargrethe changed the title Live spellchecking in a swixlm textarea? Defining aspell dictionary? Jul 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant