2011-04-05 109 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