Results 1 to 6 of 6

Thread: Debugging - Global Event Listener?

  1. #1
    Sencha User lukefowell89's Avatar
    Join Date
    Nov 2010
    Location
    Dorset, UK
    Posts
    262

    Default Debugging - Global Event Listener?

    I am having real problems debugging an issue I have at the moment, is it possible and if so how would I go about console logging every event that fires, so I can track what events are going off when etc.

    Anyone?
    My Web Design, Development & Internet Marketing Blog: http://www.aztec-online.com
    Read My Review of the latest Ext JS Framework:Ext JS 4 Review

  2. #2
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,153

    Default

    Code:
    Ext.util.Observable.prototype.fireEvent = Ext.util.Observable.prototype.fireEvent.createSequence(console.log);

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Ext.util.Observable.capture and Ext.util.Observable.observeClass can come in handy here too.

  4. #4
    Sencha User lukefowell89's Avatar
    Join Date
    Nov 2010
    Location
    Dorset, UK
    Posts
    262

    Default

    Perfect thanks!
    My Web Design, Development & Internet Marketing Blog: http://www.aztec-online.com
    Read My Review of the latest Ext JS Framework:Ext JS 4 Review

  5. #5
    Sencha User lukefowell89's Avatar
    Join Date
    Nov 2010
    Location
    Dorset, UK
    Posts
    262

    Default

    How do I use capture and observeClass?

    Thanks
    My Web Design, Development & Internet Marketing Blog: http://www.aztec-online.com
    Read My Review of the latest Ext JS Framework:Ext JS 4 Review

  6. #6
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Code:
    Ext.util.Observable.capture(messageBus, console.log);
    or
    Code:
    Ext.util.Observable.observeClass(Ext.util.Observable, {
      myevent: console.log
    });

Similar Threads

  1. custom global event
    By tarik in forum Community Discussion
    Replies: 9
    Last Post: 1 Feb 2012, 11:45 PM
  2. Global Event Listener
    By kgvsekar in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 12 Aug 2010, 10:56 AM
  3. Replies: 5
    Last Post: 4 Dec 2009, 11:02 AM
  4. Global HttpProxy event?
    By technics in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 3 Dec 2009, 3:00 PM
  5. [Solved] Global listener/function to reset
    By buntyindia in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 12 May 2009, 4:01 AM

Posting Permissions

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