2012-12-05 43 views
2

我在GWT中運行我的web工作人員時遇到問題,以防我爲多個代理構建它們。 我收到一個錯誤,未定義unflattenKeylistIntoAnswers函數。 事實上,這個函數是爲主JS定義的,但是爲Web工作者JS定義。 另外,還沒有定義其他一些函數,例如computePropValue。GWT web workers unflattenKeylistIntoAnswers not defined

我錯過了什麼?也許某種旗子?

這是我的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> 
+0

我發現編譯我的webworkers與GWT 2.5,但與GWT 2.4作品相同的問題。您還需要使用GWT 2.4編譯所有引用的項目,因此最好在Window-> Preferences-> Google-> Web Toolkit中全局更改默認SDK –

回答

1

由於GWT 2.5你需要強制GWT編譯器生成只有一個工人置換。添加到您的GWT XML文件(更換您的user.agent屬性):

<set-property name="user.agent" value="safari"/> 
<set-configuration-property name="user.agent.runtimeWarning" value="false" /> 

在我的情況下,工作人員還與「野生動物園」 user.agent選項運行在Firefox。