我在GWT中运行我的web工作者时遇到了问题,以防我为多个代理构建它们。我收到未定义unflattenKeylistIntoAnswers函数的错误消息。实际上,该函数是为主JS定义的,而不是为Web worker JS定义的。此外,还没有定义其他一些函数,如computePropValue。
我是不是遗漏了什么?也许是某种旗帜?
这是我的gwt xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Could not determine the version of your GWT SDK; using the module DTD from GWT 1.6.4. You may want to change this. -->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-source/core/src/gwt-module.dtd">
<module rename-to="BucketsSnapperWorker">
<inherits name="path.to.Core" />
<source path="" />
<!-- Use the WebWorker linker for a Dedicated worker-->
<add-linker name="dedicatedworker" />
<entry-point class="path.to.EntryPoint"/>
<set-property name="user.agent" value="safari,gecko1_8"/>
</module>发布于 2012-12-19 23:32:59
从GWT2.5开始,您需要强制GWT编译器只为workers生成一个排列。将此代码添加到gwt xml文件中(替换user.agent属性):
<set-property name="user.agent" value="safari"/>
<set-configuration-property name="user.agent.runtimeWarning" value="false" />在我的例子中,worker也使用"safari“user.agent选项在火狐中运行。
https://stackoverflow.com/questions/13730085
复制相似问题