Results 1 to 2 of 2

Thread: Controller Not Recognizing xtype ComponentQuery

    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

    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 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: '', 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


    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts