Sencha Touch 2 - Main Width? -
my english bad , why write short , direct :o)
my view :
ext.define('anteile.view.main', { extend : 'ext.container', xtype : 'xmain', maxwidth :800, maxheight :400, config : { layout : 'fit', id :'main', fullscreen : true, items : [ { xtype : 'xnavigationbar' }, { xtype : 'xsidebar' }, { xtype : 'xmaincontainerview', flex : 1 } ] } } ); my controller :
ext.define('anteile.controller.slidenavigation', { extend : 'ext.app.controller', config : { refs: { // xmain xmaincontainer :'xmain', idmaincontainer :'xmain[id=main]', }, }, init: function() { this.callparent(); this.initcontainer(); }, initcontainer: function() { this.fconsole('this.x: '+this.getxmaincontainer().getwidth()); this.fconsole('this.id: '+this.getidmaincontainer().getwidth()); } ... ... concole output initcontainer :
this.x: null
this.id: null
why x , id null instead of 800
greetings volker
yes that's true i'm new.
have changed , still null
view
ext.define('anteile.view.main', { extend : 'ext.container', xtype : 'xmain', config : { maxwidth :800, maxheight :400, name :'main', layout : 'fit', fullscreen : true, items : [ { xtype : 'xnavigationbar' }, { xtype : 'xsidebar' }, { xtype : 'xmaincontainerview', flex : 1 } ] } } ); contoller
ext.define('anteile.controller.slidenavigation', { extend : 'ext.app.controller', config : { refs: { // xmain xmaincontainer :'xmain', idmaincontainer :'xmain[name=main]', // > idmaincontainer :'xmain[name="main"]' <neither }, }, init: function() { this.callparent(); this.initcontainer(); }, initcontainer: function() { this.fconsole('this.x: '+this.getxmaincontainer().getwidth()); this.fconsole('this.id: '+this.getidmaincontainer().getwidth()); }
Comments
Post a Comment