2011-10-19 12 views
0

私は自分のアプリケーション内の前のパネルに戻ることができないのはなぜか分かりません。十分な話、私は前のパネルで以下のコードを使用することにより、上記のこのビューに取得していますいくつかのコードSenchaの "this.ownerCt.setActiveItem ..."を使用して前のパネルに戻ることができません

appsDetails = Ext.extend(Ext.Panel, { 
layout: 'fit', 
scroll: 'verticall', 

initComponent: function() { 

    this.dockedItems = [{ 
     xtype: 'toolbar', 
     items: [{ 
      ui: 'back', 
      scope: 'this', 
      handler: function() { 

       console.log(this.ownerCt) //This returns "undefined" 

       this.ownerCt.setActiveItem(this.prevCard, { 
        type: 'slide', 
        reverse: true, 
        scope: this, 
        after: function() { 
         this.destroy(); 
        } 
       }) 
      } 
     }] 
    }]; 

    this.items = [{ 
     styleHtmlContent: true, 
     tpl: description, 
     data: this.record.data 
    }]; 

    appsDetails.superclass.initComponent.call(this); 
} 
}); 

selection: function(list, index) { 

if (index[0] !== undefined) { 
    var details = new appsDetails({ 
     homeCard: this.appsPanel, 
     record: index[0], 
    }); 

    this.setActiveItem(details, {type: 'slide', direction: 'left'}) 
} 
} 

私は希望パネルになって何の問題もないが、私は来ることができません前のものを元に戻します。あなたの助け

答えて

0

あなたが値'this'で文字列オブジェクトを渡しているため

Thxを。この行を変更してください:scope:'this' in scope:this

+0

私はそれを見たことがありません:)私は以前のパネルに戻ってきました。私は以前に選択した項目を2度タップしてその説明に戻る必要があることに気付きましたそうするために別のアイテムに1回、何か案が? – slmd

関連する問題