Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: tree node copy(deep) not working (4.0.1)

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #11
    Sencha User
    Join Date
    Nov 2008
    Location
    Lyon, France
    Posts
    234
    Vote Rating
    52
      0  

    Default

    Problem still present under B3.
    C.

  2. #12
    Sencha User
    Join Date
    Feb 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Bump! This feature will be a huge selling point to my manager and our clients!

  3. #13
    Sencha User
    Join Date
    Nov 2008
    Location
    Lyon, France
    Posts
    234
    Vote Rating
    52
      3  

    Default

    In general, I really appreciate performance and code improvement of 4.1 (to be honest I felt really worried at some point...). So thanks for the good work and effort.

    Now, on this one.
    It has been almost one year that this bug has been reported and regularly bumped, and still nothing (not even a bug-id or acknowledgement).

    Since the problem lies in a static function being applied while decorating tree nodes, a simple override will not work, hence the code below. But please, take this into account into the code base.

    Cheers,
    C.

    Code:
    (function() {
    	var initBody = Ext.data.NodeInterface.getPrototypeBody();
    	Ext.data.NodeInterface.addStatics({getPrototypeBody : function() {
    				return Ext.apply(
    					  initBody, {
    					 copy: function(newId, deep) {
    			                    var me = this,
    			                        //result = me.callOverridden(arguments),
    			                        result = me.createNode(me.callOverridden(arguments)),
    			                        len = me.childNodes ? me.childNodes.length : 0,
    			                        i;
    			                    if (deep) {
    			                        for (i = 0; i < len; i++) {
    			                       //     result.appendChild(me.childNodes[i].copy(true));
    			                            result.appendChild(me.childNodes[i].copy(null, true));
    			                        }
    			                    }
    			                    return result;
    			            }
    				})
    			}
    	})
    })();

  4. #14
    Sencha User
    Join Date
    Dec 2011
    Posts
    20
    Vote Rating
    5
      0  

    Default

    Thanks for posting the workaround! I do hope that it'd be incorporated into the main product, at least in 4.1.

  5. #15
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    27
    Vote Rating
    2
      0  

    Default

    Bug still present in 4.1.1
    Any plan to fix it when working workaround provided from community already exists?

  6. #16
    Sencha User
    Join Date
    Nov 2008
    Location
    Lyon, France
    Posts
    234
    Vote Rating
    52
      0  

    Default

    Bumping, and bouncing.
    Cheers,
    C.

  7. #17
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,609
    Vote Rating
    874
      0  

    Default

    Resolved in EXTJSIV-7261.
    Evan Trimboli
    Twitter - @evantrimboli

  8. #18
    Sencha User
    Join Date
    Nov 2008
    Location
    Lyon, France
    Posts
    234
    Vote Rating
    52
      0  

    Default

    Excellent, thanks .

Page 2 of 2 FirstFirst 12

Posting Permissions

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