2012-11-06 199 views
1

我一直在关注Sencha Touch上的Miami Coder's tutorialSencha Touch 2 TypeError

我得到这个以下错误:

TypeError: ‘undefined’ is not a function (evaluating ‘this.getRandomInt(0, 100)’) Notes.js:20 

是指在控制器中的以下行:

var noteId = (now.getTime()).toString() + (this.getRandomInt(0, 100)).toString(); 

我试图消除级联的第二部分,并决定处理以后但是,新的错误弹出:

TypeError: 'undefined' is not a function (evaluating 'animation.setLayout(layout)') 

是指:Container.js:1233

有什么想法?

回答

0
getRandomInt() 

是一个包含math.random的本地函数。您应该创建该功能。