2014-11-05 45 views
0

我在我的應用程序中創建了config.Runtime js,並且一切正常,我可以設置並獲取其中的參數。config.Runtime在編譯後無法工作

Ext.define('TaskTouch.config.Runtime', { 
singleton: true, 
config: { 
    selectedCategory: 0, 
    serviceURL : 'resources/service.asmx/' 
}, 
constructor: function (config) { 
    this.initConfig(config); 
} 

});

的事情是,當我建立我的程序,我得到以下錯誤:

Error evaluating http://localhost:44092/TaskTouch/build/production/TaskTouch/app.js with message: TypeError: TaskTouch.config.Runtime is undefined 

我確實需要它:

Ext.require([ 
'Ext.MessageBox', 
'Ext.Panel', 
'Ext.data.Store', 


    'TaskTouch.config.Runtime' 
]); 

Ext.application({.... 

所以我不知道爲什麼它不生成後工作(可能是我需要在app.json中更新的東西?)

+0

你在哪裏保存你的配置文件夾,在應用程序文件夾或外部? – 2014-11-06 08:42:28

+0

裏面的應用程序文件夾相同的控制器/型號/配置文件... – Alophind 2014-11-07 13:51:29

回答

0

檢查「TaskTouch.config.Runtime」文件的名稱和位置...有時是由於印刷錯誤而發生的。

+0

它的罰款,正如我所說的,它停止工作後才建立,只有在sencha觸摸2 ... – Alophind 2014-11-24 13:09:31