Skip navigation
Currently Being Moderated

Spell checker error: null cannot be parsed to a squiggly dictionary

May 16, 2012 12:26 PM

Tags: #dictionary #squiggly

I organized a spell-checker with help Squiggly in my app ( http://labs.adobe.com/technologies/squiggly/).

_newdict.addEventListener(Event.COMPLETE, handleLoadComplete);
_newdict
.load("dictionaries/en_EN/en_EN.aff", "dictionaries/en_EN/en_EN.dic");

Everything works fine when the dictionary files is in the same folder as the app. But the dictionary have large size (over 5MB). Therefore load it on user demand. Files can not save the program folder, but only application Storage Directory.

However, when initializing the dictionary there is an error: null cannot be parsed to a squiggly dictionary. I've tried both ways: file1.nativePath and file1.url, it is still the error.

var file1:File = File.applicationStorageDirectory.resolvePath("dictionaries/en_EN/en_EN.aff");
var file2:File = File.applicationStorageDirectory.resolvePath("dictionaries/en_EN/en_EN.dic");
if (!file1.exists || !file2.exists){
   
//download files from the server
} else {
    _newdict
.addEventListener(Event.COMPLETE, handleLoadComplete);
    _newdict
.load(file1.nativePath,file2.nativePath);
  
//_newdict.load(file1.url,file2.url);
}

Tell me how to solve the issue, please?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points