1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    480
    Vote Rating
    1
    plalx has a spectacular aura about plalx has a spectacular aura about

      0  

    Default Ext.Component.findParentByType (supporting inheritance seach)

    Ext.Component.findParentByType (supporting inheritance seach)


    The current findParentByType method doesn't support inheritance search.
    There are many cases where it is usefull to be able to find a parent by its parent class.
    Here's a replacement for the native Ext.Component.findParentByType method.
    This method is supporting inheritance search for class names and xtypes.

    Code:
    Ext.override(Ext.Component, {
     findParentByType: function(type){
      if (Ext.isFunction(type)){
       return this.findParentBy(function(p){
                    return p instanceof type;
                });
      } else {
       return (Ext.isFunction(Ext.ComponentMgr.types[type]))? 
        this.findParentByType(Ext.ComponentMgr.types[type]): 
        null;
      }
     }
    });
    Last edited by mystix; 1 Apr 2010 at 7:32 AM. Reason: POST CODE IN [code][/code] TAGS. see http://extjs.com/forum/misc.php?do=bbcode#code

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Posts
    17
    Vote Rating
    0
    superbinary is on a distinguished road

      0  

    Default thanks!

    thanks!


    it's really useful. thanks!

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar