无法在Sencha Touch中构建应用程序 - 使用插件进行依赖性问题

时间:2013-02-14 09:03:02

标签: extjs sencha-touch sencha-touch-2

我正在使用Sencha Cmd v3.0.2.288 我需要构建一个应用程序,(sencha app build) 我收到此错误。

因为我的理解似乎与插件Plugin.field.TimePicker的依赖性有关。

在app.js中我使用

加载此插件
Ext.Loader.setPath('Plugin', './plugin');

它在桌面浏览器上运行良好。

你能指出我在这里做错了吗?

js:9667
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ],) -- C:\wamp\www\gs-2\app\view\Login.j
s:1467
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>             ]) -- C:\wamp\www\gs-2\app\view\Logi
n.js:7871
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>             ],) -- C:\wamp\www\gs-2\app\view\Nav
igViewTimetable.js:2471
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ],) -- C:\wamp\www\gs-2\app\view\ScanQRC
ontainer.js:13367
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>             ]) -- C:\wamp\www\gs-2\app\view\Sett
ings.js:3671
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ]) -- C:\wamp\www\gs-2\app\view\Settings
Failure.js:3867
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ],) -- C:\wamp\www\gs-2\app\view\TtDetai
lView.js:10367
[INF]           Processing class inheritance graph
[INF]           Processing instantiation refereces to classes and aliases
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ]) -- C:\wamp\www\gs-2\app\model\Edit.js
:1667
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ],) -- C:\wamp\www\gs-2\app\model\Today.
js:9667
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ],) -- C:\wamp\www\gs-2\app\view\Login.j
s:1467
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>             ]) -- C:\wamp\www\gs-2\app\view\Logi
n.js:7871
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>             ],) -- C:\wamp\www\gs-2\app\view\Nav
igViewTimetable.js:2471
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ],) -- C:\wamp\www\gs-2\app\view\ScanQRC
ontainer.js:13367
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>             ]) -- C:\wamp\www\gs-2\app\view\Sett
ings.js:3671
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ]) -- C:\wamp\www\gs-2\app\view\Settings
Failure.js:3867
[WRN]           C1000: Yui Compressor Warning (Trailing comma is not legal in an
 ECMA-262 object initializer =>         ],) -- C:\wamp\www\gs-2\app\view\TtDetai
lView.js:10367
[INF]           Processing source dependencies
[ERR]           Failed to find file for Plugin.field.TimePicker
 required by C:\wamp\www\gs-2\app\view\DashboardEdit.js
[ERR]
[ERR]           BUILD FAILED
[ERR]           com.sencha.exceptions.BasicException: The following error occurr
ed while executing this line:
[ERR]           C:\wamp\www\gs-2\.sencha\app\build-impl.xml:137: com.sencha.exce
ptions.ExScript: Wrapped com.sencha.exceptions.BasicException: com.sencha.except
ions.ExBuild: Failed to find any files for Plugin.field.TimePicker (x-app-build#
273)   runAppBuild (x-app-build:273)   [anonymous] (x-app-build:545)   x_app_bui
ld (x-app-build:543)   <script> (anonymous:1)
[ERR]                   at com.sencha.exceptions.BasicException.wrap(BasicExcept
ion.java:43)
[ERR]                   at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]                   at com.sencha.cli.AbstractCommand.dispatch(AbstractComma
nd.java:182)
[ERR]                   at com.sencha.ant.SenchaCommandTask.doExecute(SenchaComm
andTask.java:69)
[ERR]                   at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:2
2)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]                   at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR]                   at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR]                   at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR]                   at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR]                   at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR]                   at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:94)
[ERR]                   at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:98)
[ERR]                   at com.sencha.command.BasePluginCommands$BaseNamePathCom
mand.run(BasePluginCommands.java:142)
[ERR]                   at com.sencha.command.app.AppCommands$BuildCommand.execu
te(AppCommands.java:116)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]                   at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR]           Caused by: C:\wamp\www\gs-2\.sencha\app\build-impl.xml:144: The
following error occurred while executing this line:
[ERR]           C:\wamp\www\gs-2\.sencha\app\build-impl.xml:137: com.sencha.exce
ptions.ExScript: Wrapped com.sencha.exceptions.BasicException: com.sencha.except
ions.ExBuild: Failed to find any files for Plugin.field.TimePicker (x-app-build#
273)   runAppBuild (x-app-build:273)   [anonymous] (x-app-build:545)   x_app_bui
ld (x-app-build:543)   <script> (anonymous:1)
[ERR]                   at org.apache.tools.ant.ProjectHelper.addLocationToBuild
Exception(ProjectHelper.java:551)
[ERR]                   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:44
4)
[ERR]                   at org.apache.tools.ant.taskdefs.CallTarget.execute(Call
Target.java:105)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]                   at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR]                   at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR]                   at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR]                   at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR]                   at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR]                   at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR]                   at com.sencha.command.ant.AntCommand.execute(AntCommand.
java:75)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR]                   ... 31 more
[ERR]           Caused by: C:\wamp\www\gs-2\.sencha\app\build-impl.xml:137: com.
sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.BasicException: com.se
ncha.exceptions.ExBuild: Failed to find any files for Plugin.field.TimePicker (x
-app-build#273)   runAppBuild (x-app-build:273)   [anonymous] (x-app-build:545)
  x_app_build (x-app-build:543)   <script> (anonymous:1)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:116)
[ERR]                   at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR]                   at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR]                   at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR]                   at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR]                   at org.apache.tools.ant.helper.SingleCheckExecutor.execu
teTargets(SingleCheckExecutor.java:38)
[ERR]                   at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR]                   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:44
2)
[ERR]                   ... 52 more
[ERR]           Caused by: com.sencha.exceptions.ExScript: Wrapped com.sencha.ex
ceptions.BasicException: com.sencha.exceptions.ExBuild: Failed to find any files
 for Plugin.field.TimePicker (x-app-build#273)   runAppBuild (x-app-build:273)
 [anonymous] (x-app-build:545)   x_app_build (x-app-build:543)   <script> (anony
mous:1)
[ERR]                   at com.sencha.util.JavaScriptHost.eval(JavaScriptHost.ja
va:74)
[ERR]                   at com.sencha.ant.ScriptTask.executeScript(ScriptTask.ja
va:92)
[ERR]                   at org.apache.tools.ant.taskdefs.optional.script.ScriptD
efBase.execute(ScriptDefBase.java:50)
[ERR]                   at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR]                   at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
Source)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR]                   ... 59 more
[ERR]           Caused by: org.mozilla.javascript.WrappedException: Wrapped com.
sencha.exceptions.BasicException: com.sencha.exceptions.ExBuild: Failed to find
any files for Plugin.field.TimePicker (x-app-build#273)
[ERR]                   at org.mozilla.javascript.Context.throwAsScriptRuntimeEx
(Context.java:1786)
[ERR]                   at org.mozilla.javascript.MemberBox.invoke(MemberBox.jav
a:183)
[ERR]                   at org.mozilla.javascript.NativeJavaMethod.call(NativeJa
vaMethod.java:247)
[ERR]                   at org.mozilla.javascript.Interpreter.interpretLoop(Inte
rpreter.java:1701)
[ERR]                   at org.mozilla.javascript.Interpreter.interpret(Interpre
ter.java:854)
[ERR]                   at org.mozilla.javascript.InterpretedFunction.call(Inter
pretedFunction.java:164)
[ERR]                   at org.mozilla.javascript.ContextFactory.doTopCall(Conte
xtFactory.java:426)
[ERR]                   at org.mozilla.javascript.ScriptRuntime.doTopCall(Script
Runtime.java:3178)
[ERR]                   at org.mozilla.javascript.InterpretedFunction.exec(Inter
pretedFunction.java:175)
[ERR]                   at org.mozilla.javascript.Context.evaluateString(Context
.java:1111)
[ERR]                   at com.sencha.util.JavaScriptHost.eval(JavaScriptHost.ja
va:67)
[ERR]                   ... 66 more
[ERR]           Caused by: com.sencha.exceptions.BasicException: com.sencha.exce
ptions.ExBuild: Failed to find any files for Plugin.field.TimePicker
[ERR]                   at com.sencha.cli.Commands$Cmd.create(Commands.java:117)

[ERR]                   at com.sencha.cli.Commands.findCommand(Commands.java:74)

[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:43)
[ERR]                   at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR]                   at com.sencha.cli.AbstractCommand.dispatch(AbstractComma
nd.java:182)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Sour
[ERR]           ce)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at org.mozilla.javascript.MemberBox.invoke(MemberBox.jav
a:161)
[ERR]                   ... 75 more
[ERR]           Caused by: com.sencha.exceptions.ExBuild: Failed to find any fil
es for Plugin.field.TimePicker
[ERR]                   at com.sencha.tools.compiler.CompilerContext.processFile
Dependencies(CompilerContext.java:451)
[ERR]                   at com.sencha.tools.compiler.CompilerContext.processFile
Dependencies(CompilerContext.java:413)
[ERR]                   at com.sencha.tools.compiler.CompilerContext.processFile
Dependencies(CompilerContext.java:394)
[ERR]                   at com.sencha.tools.compiler.CompilerContext.doProcessDe
pendencies(CompilerContext.java:345)
[ERR]                   at com.sencha.tools.compiler.CompilerContext.processDepe
ndencies(CompilerContext.java:335)
[ERR]                   at com.sencha.tools.compiler.CompilerContext.processDepe
ndencies(CompilerContext.java:307)
[ERR]                   at com.sencha.command.compile.CompileCommands.getCache(C
ompileCommands.java:199)
[ERR]                   at com.sencha.command.compile.CompileCommands.getCache(C
ompileCommands.java:154)
[ERR]                   at com.sencha.command.compile.CompileCommands$BaseFilter
Command.<init>(CompileCommands.java:300)
[ERR]                   at com.sencha.command.compile.CompileCommands$IncludeCom
mand.<init>(CompileCommands.java:420)
[ERR]                   at com.sencha.command.compile.CompileCommands$UnionComma
nd.<init>(CompileCommands.java:425)
[ERR]                   at com.sencha.command.compile.CompileCommands.createUnio
n(CompileCommands.java:1068)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR]                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR]                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR]                   at java.lang.reflect.Method.invoke(Unknown Source)
[ERR]                   at com.sencha.cli.Commands$Cmd.create(Commands.java:99)
[ERR]                   ... 84 more
[ERR]
[ERR]           Total time: 22 seconds
[ERR]           com.sencha.exceptions.BasicException: The following error occurr
ed while executing this line:
C:\wamp\www\gs-2\.sencha\app\build-impl.xml:137: com.sencha.exceptions.ExScript:
 Wrapped com.sencha.exceptions.BasicException: com.sencha.exceptions.ExBuild: Fa
iled to find any files for Plugin.field.TimePicker (x-app-build#273)
   runAppBuild (x-app-build:273)
   [anonymous] (x-app-build:545)
   x_app_build (x-app-build:543)
   <script> (anonymous:1)

c:\wamp\www\gs-2>

TimePicker.js

Ext.define('Plugin.field.TimePicker', {
    extend: 'Ext.field.Text',
    alternateClassName: 'Plugin.form.TimePicker',
    xtype: 'timepickerfield',
    requires: [
        'Plugin.picker.Time',
        'Ext.DateExtras'
    ],

    config: {
        ui: 'select',

        /**
         * @cfg {Object/Ext.picker.Date} picker
         * An object that is used when creating the internal {@link Ext.picker.Date} component or a direct instance of {@link Ext.picker.Date}
         * Defaults to true
         * @accessor
         */
        picker: true,

        /**
         * @cfg {Boolean}
         * @hide
         * @accessor
         */
        clearIcon: false,

        /**
         * @cfg {Object/Date} value
         * Default value for the field and the internal {@link Ext.picker.Date} component. Accepts an object of 'year',
         * 'month' and 'day' values, all of which should be numbers, or a {@link Date}.
         *
         * Example: {year: 1989, day: 1, month: 5} = 1st May 1989 or new Date()
         * @accessor
         */

        /**
         * @cfg {Boolean} destroyPickerOnHide
         * Whether or not to destroy the picker widget on hide. This save memory if it's not used frequently,
         * but increase delay time on the next show due to re-instantiation. Defaults to false
         * @accessor
         */
        destroyPickerOnHide: false,

        /**
         * @cfg {String} dateFormat The format to be used when displaying the date in this field.
         * Accepts any valid date format. You can view formats over in the {@link Ext.Date} documentation.
         * Defaults to `Ext.util.Format.defaultDateFormat`.
         */
        dateFormat: null,

        /**
         * @cfg {Object}
         * @hide
         */
        component: {
            useMask: true
        }
    },

    initialize: function() {
        this.callParent();

        this.getComponent().on({
            scope: this,
            masktap: 'onMaskTap'
        });

        this.getComponent().input.dom.disabled = true;
    },

    syncEmptyCls: Ext.emptyFn,

    applyValue: function(value) {
        if (!Ext.isDate(value) && !Ext.isObject(value)) {
            return null;
        }

        if (Ext.isObject(value)) {
            return new Date(value.year, value.month - 1, value.day);
        }

        return value;
    },

    updateValue: function(newValue) {
        var picker = this._picker;
        if (picker && picker.isPicker) {
            picker.setValue(newValue);
        }

        // Ext.Date.format expects a Date
        if (newValue !== null) {
            this.getComponent().setValue(Ext.Date.format(newValue, 'H:i'));
        } else {
            this.getComponent().setValue('');
        }

        if (this._picker && this._picker instanceof Plugin.picker.Time) {
            this._picker.setValue(newValue);
        }
    },

    /**
     * Updates the date format in the field.
     * @private
     */
    updateDateFormat: function(newDateFormat, oldDateFormat) {
        var value = this.getValue();
        if (newDateFormat != oldDateFormat && Ext.isDate(value)) {
            this.getComponent().setValue(Ext.Date.format(value, 'H:i'));
        }
    },

    /**
     * Returns the {@link Date} value of this field.
     * If you wanted a formated date
     * @return {Date} The date selected
     */
    getValue: function() {
        if (this._picker && this._picker instanceof Plugin.picker.Time) {
            return this._picker.getValue();
        }

        return this._value;
    },

    /**
     * Returns the value of the field formatted using the specified format. If it is not specified, it will default to
     * {@link #dateFormat} and then {@link Ext.util.Format#defaultDateFormat}.
     * @param {String} format The format to be returned
     * @return {String} The formatted date
     */
    getFormattedValue: function(format) {
        var value = this.getValue();
        return (Ext.isDate(value)) ? Ext.Date.format(value, format || 'H:i') : value;
    },

    applyPicker: function(picker, pickerInstance) {
        if (pickerInstance && pickerInstance.isPicker) {
            picker = pickerInstance.setConfig(picker);
        }

        return picker;
    },

    getPicker: function() {
        var picker = this._picker,
            value = this.getValue();

        if (picker && !picker.isPicker) {
            picker = Ext.factory(picker, Plugin.picker.Time);
            if (value != null) {
                picker.setValue(value);
            }
        }

        picker.on({
            scope: this,
            change: 'onPickerChange',
            hide  : 'onPickerHide'
        });
        Ext.Viewport.add(picker);
        this._picker = picker;

        return picker;
    },

    /**
     * @private
     * Listener to the tap event of the mask element. Shows the internal DatePicker component when the button has been tapped.
     */
    onMaskTap: function() {
        if (this.getDisabled()) {
            return false;
        }

        if (this.getReadOnly()) {
            return false;
        }

        this.getPicker().show();

        return false;
    },

    /**
     * Called when the picker changes its value
     * @param {Ext.picker.Date} picker The date picker
     * @param {Object} value The new value from the date picker
     * @private
     */
    onPickerChange: function(picker, value) {
        var me = this;

        me.setValue(value);
        me.fireEvent('change', me, me.getValue());
    },

    /**
     * Destroys the picker when it is hidden, if
     * {@link Ext.field.DatePicker#destroyPickerOnHide destroyPickerOnHide} is set to true
     * @private
     */
    onPickerHide: function() {
        var picker = this.getPicker();
        if (this.getDestroyPickerOnHide() && picker) {
            picker.destroy();
            this._picker = true;
        }
    },

    reset: function() {
        this.setValue(this.originalValue);
    },

    // @private
    destroy: function() {
        var picker = this._picker;

        if (picker && picker.isPicker) {
            picker.destroy();
        }

        this.callParent(arguments);
    }
    //<deprecated product=touch since=2.0>
}, function() {
    this.override({
        getValue: function(format) {
            if (format) {
                //<debug warn>
                Ext.Logger.deprecate("format argument of the getValue method is deprecated, please use getFormattedValue instead", this);
                //</debug>
                return this.getFormattedValue(format);
            }
            return this.callOverridden();
        }
    });

    /**
     * @method getDatePicker
     * @inheritdoc Ext.field.DatePicker#getPicker
     * @deprecated 2.0.0 Please use #getPicker instead
     */
    Ext.deprecateMethod(this, 'getTimePicker', 'getPicker');
    //</deprecated>
});

app.js中的

launch: function() {

    Ext.Viewport.add([
    {
        xtype: 'loginview'
    },
    {
        xtype: 'mainview'
    }
    ]);

    Ext.Loader.setPath('Plugin', './plugin');
}

1 个答案:

答案 0 :(得分:2)

Ext.Loader.setPath之外尝试Ext.application。你的应用正在使用浏览器吗? 您是否在app.js中为此require文件添加了Timepicker.js。因为它是一个插件,你可以添加 -

requires:['Plugin.field.TimePicker'] ST会在构建应用时自动获取require中提到的文件,因此它是放置所需内容的好地方。 另外,我认为文件/目录名称也区分大小写。