2013-03-20 106 views
0

我正在開發基於Sproutcore 1.9.1的Web應用程序。要從服務器檢索數據,它會生成一個SC.Request.getUrl()請求,該請求在除IE8之外的所有瀏覽器中都能正常工作。 對於IE8當該請求是這樣的:notify()在IE8中不工作

SC.Request.getUrl("'http://example.com/some/path') 
    .set('isJSON', YES) 
    .async(false)  // made async false to work in IE 
    .notify(this, 'someMethodDidComplete', { query: query, store: store}) 
    .send(); 

works fine. But when the request is : 

    SC.Request.getUrl("'http://example.com/some/path') 
    .set('isJSON', YES) 
    .notify(this, 'someMethodDidComplete', { query: query, store: store}) 
    .send(); 

it works fine for other browsers but for IE8, it is not working. After spending some 
time with the issue i found out that the finishrequest() is not invoking. For doing so 
what I did is made 'asynchronous false' and then it works. Now I don't know what to do. 
Please suggest me something on this and why normal request is not working. 
thanks in advance. 

回答

0

此問題是已知的(https://github.com/sproutcore/sproutcore/issues/866)和似乎是固定的,至少在SC主。作爲一個方面說明,您將查詢包含在對象中並作爲參數存儲在.notify()中。你不需要做到這一點,你可以簡單地把它們作爲額外的參數和您的通知功能,將這些額外的參數來調用:

.notify(this,this.notifier,query,store) 

,並在文件中別處:

notifier: function(result,query,store){ }