Architect with Touch -- how to create event/code for tab button switch to new card
Architect with Touch -- how to create event/code for tab button switch to new card
Hello,
Using Architect 2 with Touch.
Created two tab items (Home, Topics).
Under Topics, created activeitemchange event
Clicking Topics tab bar item stays on Home screen
How do I create event/code for Topics tab button to switch to new card (with userClassName MyPanel1 and userAlias mypanel1) ?
That did not work for me.
I have Panel->Tabpanel->activeItemchange which creates code:
tabPanelActiveItemChange: function (container, value, oldvalue, options) {
alert('HERE');
}
This does print 'HERE' to screen when tap any tabBarItem -- but, how to switch to SecondPanel when second tabBarItem is tapped ?
the way I told you works and is correct. go mess with some examples, plenty of them out there show you how to do this. also use === instead of ==
setActiveItem(0) is the first tab, setActiveItem(1) is the second tab, and so on. Go through some examples that sencha provided, they really help you get your feet wet!
if (value.id === 'Topics')
{
alert('Topics'); // does display 'Topics'
tabPanel.getLayout().setActiveItem(0); // does NOT show second panel -- also setActiveItem(0) does NOT show second panel
}
With Safari Developer see that Ext.getCmp('tabPanel').getLayout().setActiveItem('topicsPanel');
causes Type Issue 'undefined' is not a function -- hmm.