滑动导航中的Sencha xtype

时间:2012-11-18 16:43:13

标签: xtype

我正在尝试将wnielson的slidenavigation插件用于sencha touch 2。 可在此处找到:slidenavigation

我习惯将我的观点分配到不同的文件中并像这样使用它们:

items: [{
    xtype: 'myxtype'
},{
    xtype: 'someotherxtype'
}]

他的例子中没有这样的代码。 Wnielson提供了八个与此类似的视图(Main.js):

items: [{
    xtype: 'toolbar',
    title: 'Item 1',
    docked: 'top'
},{
    xtype: 'panel',
    html: '<img src="resources/images/guide.jpg" width="100%" />'
}]

我试图通过将Main.js更改为:

来更改此方法
items: [{
    title: 'Test',
    group: 'Group 1',

    slideButton: {
        selector: 'toolbar'
    },
    items: [{
        xtype: 'testing'
    }]
},{..

并在Test.js中:

Ext.define("SlideNavigationExample.view.Test", {
    extend: 'Ext.Container',
    xtype: 'testing',

    items: [{
        xtype: 'toolbar',
        title: 'Testing',
        docked: 'top'
    },{
        xtype: 'panel',
        html: 'hello'
    }]
});

不幸的是,这打破了整个过程,在控制台中没有给出任何错误,但屏幕上没有显示任何错误。

我的问题是,我应该如何解决这个问题? 我真的不想要一个大的Main.js文件。

0 个答案:

没有答案