... maybe it's not .js file loaded when you create the dictionary.
( I thougth
As in my test the behaviour works well, I thougth that when you do the
getJsFile() method, the file was loaded into the browser ( even if the
browser and the execution of js scripts must wait to the complete load
of the file )
But on production deployment sometimes I got the same exception; which
I relsolved like this
public DictionaryOnDemand(String url,final String dname){
getJsFile(url);
DeferredCommand.addCommand(new Command(){
public void execute() {
dictionary = Dictionary.getDictionary(dname);
}
});
}
private native void getJsFile(String url) /*- {
var fileref = $doc.createElement('script');
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", url);
$doc.getElementsByTagName("head")[0].appendChild(fileref)
} -*/;
See if this help you
Oskar
On 1 dic, 15:27, bennyb <[EMAIL PROTECTED]> wrote:
> I am still getting the errors:
>
> [ERROR] Uncaught exception escaped
> java.util.MissingResourceException: 'example' is not a JavaScript
> object and cannot be used as a Dictionary
> at com.google.gwt.i18n.client.Dictionary.resourceErrorBadType
> (Dictionary.java:100)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---