Sencha touch 如何实现Sencha选择器

Sencha touch 如何实现Sencha选择器,sencha-touch,Sencha Touch,请任何人帮我实现Sencha采摘器,如Sencha 2 KitchenSink中所示。 i、 e./示例/厨房水槽/演示/覆盖层 我一直收到这个错误 02-15 13:41:38.879:E/Web控制台(285):正在尝试使用未在未定义位置注册的xtype:[object object]创建组件:0 下面是我的代码片段 MrFantastic.views.faith = new Ext.Panel({ id:'faith', title:'Faith',

请任何人帮我实现Sencha采摘器,如Sencha 2 KitchenSink中所示。 i、 e./示例/厨房水槽/演示/覆盖层

我一直收到这个错误

02-15 13:41:38.879:E/Web控制台(285):正在尝试使用未在未定义位置注册的xtype:[object object]创建组件:0

下面是我的代码片段

MrFantastic.views.faith = new Ext.Panel({
        id:'faith',
        title:'Faith',
        scroll:'vertical',
        style:'background-color:#ffffff',
        items: [

                {
                    xtype: 'fieldset',
                    layout: {
                        align: 'stretch',
                        type: 'vbox'
                    },
                    defaults:{
                        xtype: 'radiofield',
                        flex: 1,
                        labelWidth:'85%'
                    },
                    items: [
                        {
                            label: 'Intolerable',
                            name:'mode'
                        },
                        {
                            label: 'Tolerable',
                            name:'mode'
                        },
                        {
                            label: 'Compatible',
                            name:'mode'
                        },
                        {
                            label: 'Admirable',
                            name:'mode'
                        }
                    ]
                }
            ],
            dockedItems: [
                          {
                              dock:'top',
                              cls:"faith",
                              width:'100%',
                              height:'50%'
                          },
                          {
                              html:'<div class="text_pane"><h3>faith <span>{noun} {feyth}</span>:</h3><ol><li>belief in God or in the doctrines or teachings of religion</li><li>a system of religious belief</li><li>a strong belief in a supernatural power or powers</li></ol><!--<span>If you ask almost any lady what kind of man she wants for a husband, she is likely to say to you, "I want a God fearing man." This probably because she believes that a God feating man will be more faithful and truthful.</span>--></div>'
                          },
                          {
                              xtype: 'toolbar',
                              dock: 'bottom',
                              items: [
                                  {
                                      xtype: 'button',
                                      itemId: 'Previous',
                                      ui:'back',
                                      text: 'Previous',
                                      handler: function () {
                                          MrFantastic.views.viewport.setActiveItem('mrf_home', { type: 'slide', direction: 'right' });
                                      }
                                  },
                                  {
                                      xtype: 'spacer'
                                  },
                                  {
                                      xtype:'button',
                                      text: 'Score Him',
                                      handler: function () {
                                          if(!this.picker)
                                          {
                                              this.picker = Ext.create('Ext.Picker',{
                                                  slots:[
                                                         {
                                                             name:'compat',
                                                             title:'Compatibility Score',
                                                             data:[
                                                                   {text:'Intolerable', value:1},
                                                                   {text:'Tolerable', value:2},
                                                                   {text:'Compatible', value:3},
                                                                   {text:'Intolerable', value:4}
                                                                   ]
                                                         }
                                                         ]
                                              } );
                                          }
                                          this.picker.show();
                                      }
                                  },
                                  {
                                      xtype: 'spacer'
                                  },
                                  {
                                      xtype: 'button',
                                      text: 'Next',
                                      ui:'foward',
                                      handler: function () {
                                          MrFantastic.views.viewport.setActiveItem('family', { type: 'slide', direction: 'left' });
                                      }
                                  }
                              ]
                          }
                      ]
    });
MrFantastic.views.faith=新的外部面板({
id:“信仰”,
标题:"信仰",,
滚动:'垂直',
样式:“背景色:#ffffff”,
项目:[
{
xtype:“字段集”,
布局:{
对齐:“拉伸”,
类型:“vbox”
},
默认值:{
xtype:'无线电场',
弹性:1,
标签宽度:'85%'
},
项目:[
{
标签:“不可容忍”,
名称:'mode'
},
{
标签:“可容忍”,
名称:'mode'
},
{
标签:“兼容”,
名称:'mode'
},
{
标签:“令人钦佩”,
名称:'mode'
}
]
}
],
摘要:[
{
码头:'顶部',
cls:“信仰”,
宽度:'100%',
高度:'50%'
},
{
信仰{noon}{feyth}:
  • 对上帝或宗教教义或教义的信仰
  • 宗教信仰体系
  • 对超自然力量的强烈信仰
  • }, { xtype:'工具栏', 船坞:“底部”, 项目:[ { xtype:'按钮', itemId:'上一个', 用户界面:'返回', 文本:“上一个”, 处理程序:函数(){ MrFantastic.views.viewport.setActiveItem('mrf_home',{type:'slide',direction:'right'}); } }, { xtype:“间隔器” }, { xtype:“按钮”, 文字:“给他打分”, 处理程序:函数(){ 如果(!this.picker) { this.picker=Ext.create('Ext.picker'{ 插槽:[ { 姓名:'compat', 标题:“兼容性分数”, 数据:[ {文本:'不可容忍',值:1}, {文本:'Tolerable',值:2}, {文本:'Compatible',值:3}, {文本:'不可容忍',值:4} ] } ] } ); } this.picker.show(); } }, { xtype:“间隔器” }, { xtype:'按钮', 文本:“下一个”, 用户界面:'foward', 处理程序:函数(){ MrFantastic.views.viewport.setActiveItem('family',{type:'slide',direction:'left'}); } } ] } ] });

    请帮帮我。谢谢。

    将此代码放入
    处理程序:函数()

    :)这一定是我收到的最恭维、最有趣的感谢你的评论了不客气:)
        if(!this.picker){
        this.picker = new Ext.Picker({
            slots: [
                {
                    name : 'compat',
                    title: 'Compatibility Score',
                    data : [
                        {text: 'Intolerable', value: 1},
                        {text: 'Tolerable', value: 2},
                        {text: 'Compatible', value: 3},
                        {text: 'Intolerable', value: 4}
                    ]
                }
            ]
        });
    }
        this.picker.show();