私はまだこのチュートリアルを進めようとしていますが、成功はまちまちです。私のコントローラースクリプトには、次のものがあります。
config: {
refs: {
notesListContainer: 'noteslistcontainer',
noteEditor: 'noteeditor'
},
control: {
notesListContainer: {
newNoteCommand: 'onNewNoteCommand',
editNoteCommand: 'onEditNoteCommand'
}
}
},
onEditNoteCommand: function(list, record) {
console.log('onEditNoteCommand');
this.activateNoteEditor(record);
},
activateNoteEditor: function(record) {
var noteEditor = this.getNoteEditor();
noteEditor.setRecord(record);
Ext.Viewport.animateActiveItem(noteEditor, this.slideLeftTransition);
},
これを Chromium 18.0.1025.168 で実行すると、
Uncaught TypeError: Cannot call method 'setRecord' of undefined Notes.js:37`.
`this.getNoteEditor()'
noteEditor を返しませんが、undefined を返します。
プロジェクト全体のソースはこちらから入手できます。