1

DeftJs を Sencha Cmd で動作させるのに苦労しています。最初はCmd 4を疑っていましたが、Cmd 3でもまったく同じ結果で試したので、何かが足りないと思います。

Ext.onReady() が呼び出されているときに、「未定義のプロパティ 'インスタンス' を設定できません」というエラーが表示されます。Ext.app.Application が定義されているはずなのに定義されていません:

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のUsing Sencha Cmd (DeftJs 0.9+ のみ)の手順に従っています。 -deft-js-09-のみ

何が問題なのかについての手がかりに非常に感謝します。

4

1 に答える 1

0

Application.jsファイル(appプロジェクトのフォルダーにあります)にExt.app.Applicationrequires.

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
});
于 2014-02-24T19:53:57.880 に答える