0

当我将 tb 更改为“新项目”选项卡和“设置”选项卡时出现此错误,为什么?找不到那是什么。每个选项卡只发生一次。

顺便说一句,我在谷歌浏览器上。以前从未遇到过这个问题,而且我还没有在这个应用程序中做任何特别的事情。

这是我的标签代码

Ext.define('MyApp.view.GeneralTabs', {
extend: 'Ext.tab.Panel',

requires: [
    'MyApp.view.SingleConstant',
    'MyApp.view.ConstantsSpacer',
    'MyApp.view.MultipleConstants'
],

config: {
    id: 'generaltabs',
    items: [
        {
            xtype: 'container',
            title: 'Projects',
            iconCls: 'list',
            id: 'projectstab'
        },
        {
            xtype: 'container',
            title: 'New Project',
            iconCls: 'add',
            id: 'createtab',
            layout: {
                type: 'vbox'
            },
            items: [
                {
                    xtype: 'textfield',
                    flex: 1,
                    id: 'createnamefield',
                    label: 'Name',
                    placeHolder: 'CarboZero'
                },
                {
                    xtype: 'selectfield',
                    flex: 1,
                    id: 'createselector',
                    label: 'Type',
                    options: [
                        {
                            text: 'Event',
                            value: 'Event'
                        },
                        {
                            text: 'Trip',
                            value: 'Trip'
                        },
                        {
                            text: 'Business',
                            value: 'Business'
                        }
                    ],
                    usePicker: false
                },
                {
                    xtype: 'spacer',
                    flex: 5,
                    id: 'createspacer',
                    width: 1
                },
                {
                    xtype: 'container',
                    flex: 1,
                    id: 'createsavecontainer',
                    layout: {
                        type: 'hbox'
                    },
                    items: [
                        {
                            xtype: 'spacer',
                            flex: 1,
                            id: 'createsavespacer'
                        },
                        {
                            xtype: 'button',
                            flex: 1,
                            id: 'createbutton',
                            icon: 'true',
                            iconCls: 'action',
                            text: 'Create'
                        },
                        {
                            xtype: 'spacer',
                            flex: 1,
                            id: 'createsavespacer2'
                        }
                    ]
                }
            ]
        },
        {
            xtype: 'container',
            title: 'About',
            iconCls: 'info',
            id: 'abouttab',
            layout: {
                type: 'fit'
            },
            items: [
                {
                    xtype: 'carousel',
                    id: 'aboutcarousel',
                    items: [
                        {
                            xtype: 'container',
                            html: '<center>Awareness Tab</center>',
                            id: 'aboutawareness'
                        },
                        {
                            xtype: 'container',
                            html: '<center>Goal tab</center>',
                            id: 'aboutgoal'
                        },
                        {
                            xtype: 'container',
                            html: '<center>Sources and Partners</center>',
                            id: 'aboutsources'
                        }
                    ]
                }
            ]
        },
        {
            xtype: 'container',
            title: 'Settings',
            iconCls: 'settings',
            id: 'settingstab',
            layout: {
                type: 'card'
            },
            items: [
                {
                    xtype: 'container',
                    id: 'SettingsGeneralSettings',
                    layout: {
                        type: 'vbox'
                    },
                    items: [
                        {
                            xtype: 'selectfield',
                            flex: 3,
                            id: 'SettingLanguage',
                            label: 'Language',
                            placeHolder: 'English',
                            options: [
                                {
                                    text: 'English',
                                    value: 'English'
                                },
                                {
                                    text: 'Français',
                                    value: 'Français'
                                },
                                {
                                    text: 'Espanol',
                                    value: 'Espanol'
                                }
                            ],
                            usePicker: false
                        },
                        {
                            xtype: 'spacer',
                            flex: 1,
                            id: 'SettingsSpacer1',
                            width: 1
                        },
                        {
                            xtype: 'selectfield',
                            flex: 3,
                            id: 'SettingsUnits',
                            label: 'Units',
                            placeHolder: 'International',
                            options: [
                                {
                                    text: 'American',
                                    value: 'American'
                                },
                                {
                                    text: 'Imperial',
                                    value: 'Imperial'
                                },
                                {
                                    text: 'International',
                                    value: 'International'
                                }
                            ],
                            usePicker: false
                        },
                        {
                            xtype: 'spacer',
                            flex: 5,
                            id: 'SettingsSpacer2',
                            width: 1
                        },
                        {
                            xtype: 'button',
                            flex: 3,
                            id: 'settingsconstantsbutton',
                            ui: 'plain',
                            icon: 'true',
                            iconAlign: 'right',
                            iconCls: 'action',
                            text: 'Constants'
                        }
                    ]
                },
                {
                    xtype: 'container',
                    id: 'settingsconstantscard',
                    layout: {
                        type: 'vbox'
                    },
                    items: [
                        {
                            xtype: 'singleconstant',
                            id: 'singleconstant',
                            label: 'FirePit',
                            labelWidth: '60%'
                        },
                        {
                            xtype: 'constantsspacer',
                            id: 'constantsspacer',
                            maxHeight: 5,
                            minHeight: 0
                        },
                        {
                            xtype: 'multipleconstants',
                            id: 'Constantsmultipleconstants'
                        }
                    ]
                }
            ]
        },
        {
            xtype: 'titlebar',
            docked: 'top',
            id: 'generaltitle',
            title: 'CarboZero',
            items: [
                {
                    xtype: 'button',
                    hidden: true,
                    id: 'settingsbackbutton',
                    itemId: 'backbutton1',
                    ui: 'back',
                    text: 'Settings'
                }
            ]
        }
    ],
    tabBar: {
        docked: 'bottom',
        id: 'generaltabsconfig'
    },
    listeners: [
        {
            fn: 'onMybutton1Tap',
            event: 'tap',
            delegate: '#settingsconstantsbutton'
        },
        {
            fn: 'onSettingsbackbuttonTap',
            event: 'tap',
            delegate: '#settingsbackbutton'
        },
        {
            fn: 'onGeneraltabsActiveItemChange',
            event: 'activeitemchange'
        }
    ]
},

onMybutton1Tap: function(button, e, eOpts) {
    button.getParent().getParent().getParent().getAt(5).getAt(0).getAt(0).show();
    button.getParent().getParent().setActiveItem(1);
},

onSettingsbackbuttonTap: function(button, e, eOpts) {
    button.hide();
    button.getParent().getParent().getParent().getAt(4).setActiveItem(0);
},

onGeneraltabsActiveItemChange: function(container, value, oldValue, eOpts) {

    container.getAt(5).getAt(0).getAt(0).hide();        
}

});

这是错误

GET http://localhost/~guillaumecharron/CarboZero/true 404 (Not Found) sencha-touch-all.js:21
Ext.dom.Element.override.getPageBox sencha-touch-all.js:21
Ext.define.getContainerBox sencha-touch-all.js:21
Ext.define.getElementBox sencha-touch-all.js:21
Ext.define.getData sencha-touch-all.js:21
Ext.define.run sencha-touch-all.js:21
Ext.define.onActiveItemChange sencha-touch-all.js:21
Ext.define.doFire sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.doDispatchEvent sencha-touch-all.js:21
Ext.define.dispatchEvent sencha-touch-all.js:21
Ext.define.doFireEvent sencha-touch-all.js:21
Ext.define.relayEvent sencha-touch-all.js:21
Ext.define.onContainerActiveItemChange sencha-touch-all.js:21
Ext.define.doFire sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.doDispatchEvent sencha-touch-all.js:21
Ext.define.dispatchEvent sencha-touch-all.js:21
Ext.define.doFireEvent sencha-touch-all.js:21
Ext.define.fireAction sencha-touch-all.js:21
(anonymous function) sencha-touch-all.js:21
Ext.define.doTabChange sencha-touch-all.js:21
Ext.define.doFire sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.doDispatchEvent sencha-touch-all.js:21
Ext.define.dispatch sencha-touch-all.js:21
Ext.define.publish sencha-touch-all.js:21
Ext.define.doFire sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.doDispatchEvent sencha-touch-all.js:21
Ext.define.dispatchEvent sencha-touch-all.js:21
Ext.define.doFireEvent sencha-touch-all.js:21
Ext.define.fireAction sencha-touch-all.js:21
(anonymous function) sencha-touch-all.js:21
Ext.define.onTabTap sencha-touch-all.js:21
Ext.define.doFire sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.doDispatchEvent sencha-touch-all.js:21
Ext.define.dispatch sencha-touch-all.js:21
Ext.define.publish sencha-touch-all.js:21
Ext.define.doFire sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.doDispatchEvent sencha-touch-all.js:21
Ext.define.dispatchEvent sencha-touch-all.js:21
Ext.define.doFireEvent sencha-touch-all.js:21
Ext.define.fireAction sencha-touch-all.js:21
Ext.define.onTap sencha-touch-all.js:21
Ext.define.doFire sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.doDispatchEvent sencha-touch-all.js:21
Ext.define.dispatch sencha-touch-all.js:21
b.implement.callParent sencha-touch-all.js:21
Ext.define.dispatch sencha-touch-all.js:21
Ext.define.doPublish sencha-touch-all.js:21
Ext.define.publish sencha-touch-all.js:21
b.implement.callSuper sencha-touch-all.js:21
Ext.define.publish sencha-touch-all.js:21
Ext.define.onRecognized sencha-touch-all.js:21
Ext.define.fire sencha-touch-all.js:21
Ext.define.onTouchEnd sencha-touch-all.js:21
Ext.define.invokeRecognizers sencha-touch-all.js:21
Ext.define.onTouchEnd sencha-touch-all.js:21
Ext.define.onEvent sencha-touch-all.js:21
(anonymous function) sencha-touch-all.js:21
4

2 回答 2

0

看起来您在延迟加载期间遇到了一些问题。每当您使用未包含在requires: []数组中的类时,Sencha(或 ExtJs)都会尝试为该类加载文件。文件名将从类名中解析出来。例如,如果您有一个类 'MyApp.view.View1',Sencha 会尝试加载文件 /MyApp/view/View1.js。

希望这可以帮助。

于 2013-06-04T20:01:11.327 回答
0

我一直傻,

出于某种原因,我的 TabPanel 的图标字段设置为 true 而不是 URL。

这就是为什么我有这个错误,显然不是最好的调试跟踪。

于 2013-06-07T17:21:45.623 回答