Created
September 6, 2012 16:44
-
-
Save mitchellsimoens/3658370 to your computer and use it in GitHub Desktop.
setActiveItem and string/int
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cnt = new Ext.Container({ | |
fullscreen : true, | |
layout : 'card', | |
items : [ | |
{ | |
xtype : 'toolbar', | |
docked : 'top', | |
items : [ | |
{ | |
text : 'Test (int)', | |
handler : function (button) { | |
cnt.setActiveItem(2); | |
} | |
}, | |
{ | |
text : 'Test (string) (error in console)', | |
handler : function(button) { | |
cnt.setActiveItem('2'); | |
} | |
} | |
] | |
}, | |
{ | |
html : 'First Page' | |
}, | |
{ | |
html : 'Second Page' | |
}, | |
{ | |
html : 'Third Page' | |
} | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment