Results 1 to 2 of 2

Thread: init() function not firing in view controller

  1. #1
    Sencha User
    Join Date
    Feb 2016
    Posts
    4

    Default init() function not firing in view controller

    Hi,

    I am trying to use an init() function in a controller, but it does not fire. What is strange is I have init()'s in other controller classes and they work fine.

    Code:
    Ext.define('RA.view.FocusPanelController', {
        extend   : 'Ext.app.ViewController',
        alias    : 'controller.focuspanel',
    
    
        init: function() {
            debugger;
            Ext.toast('FOOO');
            this.callParent(arguments);
            this.listen({
                controller : {
                    '*' : {
                        refreshData: this.refreshSomeData
                    }
                }
            });
        },
    I have an initcomponent() function in my view.
    I have also tried a solution I found online of adding the controller to the Ext.application file, but that does not work.

    Any help would be greatly appreciated!
    Thanks

  2. #2
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    542
    Answers
    4

    Default

    Are you sure you actually have a view (component) using this view controller? If so please provide the view code as well.
    Use the force - read the source.

Similar Threads

  1. Replies: 6
    Last Post: 24 Apr 2015, 4:48 PM
  2. [CLOSED] Cannot add additional function for init() function in a controller
    By metas in forum Sencha Architect 2.x: Bugs
    Replies: 9
    Last Post: 3 Sep 2013, 8:40 AM
  3. Controller's launch and init functions unexpectedly firing
    By tkannenb in forum Sencha Touch 2.x: Discussion
    Replies: 2
    Last Post: 17 Sep 2012, 6:12 AM
  4. [FIXED] Controller::init() not firing
    By olouvignes in forum Sencha Touch 2.x: Bugs
    Replies: 7
    Last Post: 21 May 2012, 5:17 AM
  5. controller init only firing once for all card loads
    By cyberwombat in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 13 Jan 2012, 9:46 AM

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
  •