Results 1 to 4 of 4

Thread: Somthing going wrong after appendChil() is executed

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    69
    Vote Rating
    1
      0  

    Default Unanswered: Somthing going wrong after appendChil() is executed

    The code:
    Code:
    ...
    console.log('before appendChild: ')
    console.log(node.data);
    console.log(node.data.tablerow);
    
    var newChild = node.appendChild(node.get('tablerow')); 
    
    console.log('after appendChild: ')
    console.log(node.data);
    console.log(node.data.tablerow);
    ...
    the log as below, I want to append "tablerow" to parentNode, before appendChild(), everything is Ok. But after appendChild(), I don't know why I can't get "tablerow" although I still can see "tablerow" in node.data. Is it the "tablerow" change to other data type after appendChild()? Please help! Thank you!2.jpg

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Answers
    501
    Vote Rating
    249
      0  

    Default

    I'm not sure I follow, yet.
    It looks like from your console that it grabbed a reference to the tree node both times, no?

  3. #3
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    69
    Vote Rating
    1
      0  

    Default

    Sorry, I mean the last row record of console should be the same as second row record, but they are different before and after appendChild() is executed. I need to reuse this record to append again, but after the first appending, it contains nothing just an empty folder, I illustrate the issue with some pictures in the link below,

    http://www.sencha.com/forum/showthre...endChild(node)

    Thank you!

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Answers
    501
    Vote Rating
    249
      0  

    Default

    Any chance you can post a code snippet of what you're doing now (in [ ] code brackets, not a screenshot)?

Posting Permissions

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