2011-04-05 110 views
4

我有以下代码,并提高网络事件不会做它应该做的。我禁用了所有扩展程序,以确保它不在那里。请帮忙。如果我无法调试我的垃圾,我觉得很难创建一个应用程序。帮我!!!raise_event从客户端不工作在dev

dispatch { 
    // Some example dispatch domains 
    // domain "example.com" 
    domain "google.com" 
} 

global { 

} 
rule temp_rule is active{ 
    select when pageview ".*" 
    pre{ 

    } 
    { 
     notify("111",'123'); 

     emit<< 
      var tempapp = KOBJ.get_application("a710x19"); 
      tempapp.raise_event("temp2"); 
     >>; 
    } 
} 

rule temp2 is active{ 
    select when web temp2 
    pre{ 

    } 
    { 
     notify("222",'<div id="fbp_fblogo">123</div>'); 
     emit<< 
      try{ 
       console.log("TEMP2'd"); 
      }catch(e){} 
     >>; 
    } 
} 

回答

4

问题是您的事件名称包含一个数字。事件名称只包含字母。

raise_event呼叫您的EMIT并从select语句中移除2,它会工作。

+0

http://docs.kynetx.com/docs/Rules – frosty 2011-04-06 03:56:42

+0

亚历克斯,它工作时,我从另一个规则明确提出的事件,但它不起作用,当我从Web事件引发它。这是什么想法? – frosty 2011-04-06 17:02:56