Results 1 to 7 of 7

Thread: createInterceptor missing?

  1. #1
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default createInterceptor missing?

    tryingthis
    Code:
    Ext.util.Observable.prototype.fireEvent.createInterceptor(function() ...
    gives an error Ext.util.Observable.prototype.fireEvent.createInterceptor is not a function

    just missing or changed API?
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  2. #2
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    seems changed. This works:

    Code:
    cls = Ext.grid.GridPanel;
    Ext.util.Observable.capture(cls.prototype, function() {
       console.log(arguments);
    }, cls);
    but how to capture all events?
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  3. #3
    Sencha User
    Join Date
    Aug 2009
    Posts
    87

    Default

    Quote Originally Posted by steffenk View Post
    just missing or changed API?
    I read that ExtJS will no longer overwrite/extend JS core classes (Function, Array, ...).
    Methods that extended the JS Function class like createInterceptor are now in the Ext.Function class.

    So the solution for this should be:
    PHP Code:
    Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent, function() {...}); 
    Also the createInterception method is included in the Ext class -> the following should work, too:
    PHP Code:
    Ext.createInterceptor(Ext.util.Observable.prototype.fireEvent, function() {...}); 
    I hope this is what you searched for.

  4. #4
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    Hi,

    both doesn't work for me. Ext.createInterceptor is marked as deprecated, Ext.Function.createInterceptor works as call, but doesn't intercept fireEvent.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  5. #5
    Ext JS Premium Member gevik's Avatar
    Join Date
    May 2009
    Location
    The Netharlands
    Posts
    274

    Default

    I have the same problem. Is there a solution to this or is this a bug in the framework?

  6. #6

    Thumbs up Ext.util.Observable.prototype.fireEvent

    I have made following change and its working for me.See below.
    Code:
    Ext.util.Observable.prototype.fireEvent =Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent, function() {...});
    Thanks
    Rajiv

  7. #7

    Default

    Thanks Rajiv, you saved my day.

Similar Threads

  1. Help on createInterceptor
    By eccehomo in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 29 Dec 2008, 12:14 AM
  2. createInterceptor || createSequence
    By chalu in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 10 Apr 2008, 9:10 PM
  3. createInterceptor and createSequence
    By INeedADip in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 10 Mar 2008, 1:39 PM
  4. createInterceptor and return value
    By FritFrut in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 28 Nov 2007, 12:17 PM

Posting Permissions

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