Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2010
    Vote Rating
    planewryter is on a distinguished road


    Default Controller Not Recognizing xtype ComponentQuery

    Possible bug.

    After hours of running various tests, it looks like ST2 PR2 might have a bug in the way Ext.app.Controller is using Ext.ComponentQuery to provision a control...or--the other alternative is--I just can't figure out how to invoke control correctly.

    According the docs, Ext.ComponentQuery can be invoked with an xtype.

    Below is an example which illustrates the problem.

    The function called by the painted control is not being invoked:

    Ext.define('MyApp.controller.Viewport', {
    extend: 'Ext.app.Controller', views: ['Hello'], init: function(){
    'hello': { //xtype provisioned in Hello.js
    painted: this.onContainerPainted
    }, onContainerPainted: function(){
    console.log('The container was painted'); //DOES NOT DISPLAY IN CONSOLE
    }); console.log('Exiting MyApp.controller.Viewport'); //DOES DISPLAY IN CONSOLE
    Welcome your suggestions; thanks!

    Plane Wryter

  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Vote Rating
    rdougan will become famous soon enough



    Few tips to debug:

    - Have you tried listening to the painted event on the component itself?
    - Try hiding and then showing the component. Does the controller get the event then?

    It looks like the painted event *may* be getting fired too early?
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 1

Tags for this Thread