2013-10-28 8 views
1

나는 DechJs가 Sencha Cmd와 함께 작업하는 데 어려움을 겪고 있습니다. 처음에는 Cmd 4를 의심했지만 Cmd 3과 똑같은 결과를 얻으려고 했으므로 나는 뭔가를 놓친 것 같습니다.ExtJs가있는 DeftJs 0.9.1 4.2.1

Ext.onReady()가 호출 될 때 "정의되지 않은 속성 '인스턴스를 설정할 수 없습니다."라는 오류가 나타납니다.

Ext.onReady(function() { 
    // this won't be called until App has been created and its requires have been met... 
    Ext.app.Application.instance = new App(); // Ext.app.Application is undefined. 
}); 

내가 https://github.com/deftjs/DeftJS/wiki/Adding-Deft-JS-to-Your-Application#using-sencha-cmd-with-deft-js-09-only

에서 (만 0.9 이상 DeftJs와) 센차 cmd를 사용 의 지침에 따라 오전에 매우 감사 드리겠습니다 : 그것이 있어야 할 때 Ext.app.Application 정의되지 않는 무엇이 잘못 될지에 대한 단서.

+0

github에서 ** Phoenix-Cmd ** 참조 앱을 확인 했습니까? 이 [예제] (https://github.com/deftjs/Examples/tree/master/phoenix-cmd)를 확인한 후 나는 Sencha Cmd에 아무런 문제가 없었다. – AlperG

답변

0

Application.js 파일 (프로젝트의 app 폴더에 있음)에 requiresExt.app.Application을 포함해야합니다.

Ext.define("Phoenix.Application", { 
    extend: "Deft.mvc.Application", 
    requires: [ 
    "Deft.mixin.Controllable", 
    "Deft.mixin.Injectable", 
    // other required files, 
    "Ext.app.Application" // <=========== HERE'S THE MISSING PIECE 
    ], 

    init: function() { 
    this.beforeInit(); 
    Deft.Injector.configure(this.buildInjectorConfiguration()); 
    //Deft.promise.Deferred.enableLogging = false; 
    return this.afterInit(); 
    }, 

    // other startup code 
});