Results 1 to 7 of 7

Thread: Component - unused local variable

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-23668 in 6.5.2.
  1. #1
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,339

    Default Component - unused local variable

    ext-6.2.1.121

    Code:
    Ext.define('Ext.Component', {
        ....
        onRemoved: function(destroying) {
            var me = this,
                refHolder, // <-- unused variable
                focusTarget;
            ...

  2. #2

    Default

    Can you flesh out what your question is?


    Kevin Jackson
    Sencha Support Team

  3. #3
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,339

    Default

    Quote Originally Posted by Kevin Jackson View Post
    Can you flesh out what your question is?


    Kevin Jackson
    Sencha Support Team
    This is a minor code issue. The refHolder local variable is not used, so it'd be better to remove it. Are we supposed to report issues of this kind? I'm trying to be helpful.

  4. #4

    Default

    Les

    We always appreciate the input. I am just not sure what you are saying or where how you are seeing this. referenceHolder is a property but refHolder is only used in the mixin class that I see.


    Kevin Jackson
    Sencha Support Team

  5. #5
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,339

    Default

    I don't see that the refHolder variable is used in the onRemoved method in the Component class.
    It's declared, but not used.

    Code:
    onRemoved: function(destroying) {
        var me = this,
            refHolder;
    
    
        if (Ext.GlobalEvents.hasListeners.removed) {
            me.fireHierarchyEvent('removed');
        }
    
    
        if (me.hasListeners.removed) {
            me.fireEvent('removed', me, me.ownerCt);
        }
        
        if (!destroying) {
            me.removeBindings();
        }
    
    
        me.onInheritedRemove(destroying);
    
    
        me.ownerCt = me.ownerLayout = null;
    },

    I pasted the entire Component.js file to jshint, I'm seeing this info.

    Screen Shot 2017-02-06 at 3.56.15 PM.png

  6. #6

    Default

    Thanks so much. That was exactly what I was looking for. I'll let the Engineers know.


    Kevin Jackson
    Sencha Support Team

  7. #7

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. [FIXED] [5.0.1] Store - unused local variable
    By LesJ in forum Ext 5: Bugs
    Replies: 1
    Last Post: 8 Aug 2014, 1:34 PM
  2. [FIXED] Container - unused local variable
    By LesJ in forum Ext 5: Bugs
    Replies: 2
    Last Post: 25 Apr 2014, 2:18 PM
  3. [FIXED] AbstractView - unused local var
    By LesJ in forum Ext:Bugs
    Replies: 1
    Last Post: 15 May 2012, 2:06 PM
  4. [FIXED] [4.1B1] Unused variable
    By mankz in forum Ext:Bugs
    Replies: 1
    Last Post: 27 Dec 2011, 8:44 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
  •