2013-08-02 29 views
1

我開始將tideSDK用於簡單的桌面應用程序。我使用通知api。這適用於Windows平臺,但不適用於我的OSX Lion 10.7.5。OSX Lion中的TideSDK通知10.7.5

這是從TideSDK文檔tideSDK docs

doSomething =() -> 
    alert "nice!" 

notification = Ti.Notification.createNotification(
    title: "Notification from App" 
    message: "Click here for updates!" 
    timeout: 10 
    callback: doSomething 
    icon: "app://img/icon.png" 
) 
notification.show() 

因此喜歡的說,這適用於Windows的通知代碼,所以代碼似乎是正確的,但不能在OSX。有任何想法嗎 ?

進出口使用的SDK開發包的版本1.4.2,根據我讀它應該與低吼

回答

2

哈利上班,我不是太熟悉的CoffeeScript,但下面的代碼對我的作品在10.7 .5和10.8.4 - 它看起來類似於你所擁有的:

function showNotify(title, message) { 
    var notification = Ti.Notification.createNotification({ 
    'title': title || 'No Title', 
    'message': message || 'No Message', 
    'timeout': 10 
    }); 
    notification.show(); 
} 

showNotify("The Title", "The Message"); 

希望它有幫助。

+0

謝謝,我看到我轉過了咆哮的通知..大聲笑,愚蠢的我。所以它一直在工作 – Harry