でcreateRecordをトリガません:新しいオブジェクトは、私が持っている私のレスポンダーでは、データソース
Spanish.ADDWORD = SC.Responder.create({
didBecomeFirstResponder: function(responder) {
var store = this._store = Spanish.store.chain(); //buffer changes
var word = store.createRecord(Spanish.Word, {word: "", english: ""});
Spanish.addWordController.set("content",word);
//show the dialog
var pane = Spanish.getPath('addWordPage.mainPane');
pane.append();
pane.makeFirstResponder();
},
submit: function(){
this._store.commitChanges().destroy();
Spanish.makeFirstResponder(Spanish.READY);
}
}
私はデータソース夢中にアップしていた、と私は地元の使っていた前に、すべてが働きました。 submitをクリックすると、新しいオブジェクトは作成されず、createRecordは呼び出されません。
「Spanish.store.commitRecords();」を追加するそれがうまくいった! – LDK