1. #1
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default Suggestion: function(){} replace by Ext.emptyFn

    Suggestion: function(){} replace by Ext.emptyFn


    There are three places where no-op implementations of functions are specified as

    Code:
    function(){}
    These can be replaced by a reference to the singleton no-op function Ext.emptyFn.
    • UpdateManager
    • DisplayField
    • GridPanel

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,049
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Got it, I'll update these in SVN.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    It could be that the other ocurrences could use it too.

    Like the default, no-op constructor created by Ext.extend if you do not provide one.

    I don't know if I like the idea of a load of classes all sharing a constructor, even if it is null. Perhaps Jack can decide whether that level of byte counting is worth it/safe.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Ah, obviously Ext.extend cannot use it, it must create a new function with a new prototype, that's the whole point!

Thread Participants: 1