I want to create a empty viewport(layout:border) first, then add items to it, finally render and show.
but when I created the viewport element, it throw an error, says:
Uncaught TypeError: Cannot read property ‘flex’ of undefined
here are my code:
<script type="text/javascript" src="ext-4.0.2a/bootstrap.js"></script>
<script>
Ext.require(['*']);
Ext.onReady(function() {
Ext.QuickTips.init();
var viewport = Ext.create('Ext.container.Viewport', {
layout: 'border'
});
var north = blablabla...
viewport.add([north,south]);
viewport.doLayout();
});
</script>
According to notes that are taken from docs:
And by the way