Loading ...
Sorry, an error occurred while loading the content.
 

TreeView .removeChildren() problem

Expand Messages
  • dvidluca
    Hi, is there a bug with the removeChildren method of the TreeView control? I have a tree which features some normal nodes and one dynamic parent node. I have
    Message 1 of 3 , May 25, 2007
      Hi,

      is there a bug with the removeChildren method of the TreeView control?

      I have a tree which features some normal nodes and one dynamic parent
      node. I have subscribed to the collapse event and can succesfully
      produce an alert when the dynamic parent node is collapsed, but when I
      try to reset the node with tree.removeChildren(nodeToReset) I get a
      stack overflow message.

      I have managed to get some code together that
      removes the dynamic children when one of the non-dynamic parent nodes
      is collapsed (provided the dynamic parent has been expanded) but of
      course this is not what I need :)

      Does anyone know whether this is a bug (I have searched the bugbase)
      or how the method should be used correctly?

      Thanks
    • dvidluca
      Sorry, does no one know this or is it just so easy that I should be able to figure it out without help?! ... control? ... parent ... when I ... nodes ...
      Message 2 of 3 , May 29, 2007
        Sorry, does no one know this or is it just so easy that I should be
        able to figure it out without help?!

        --- In ydn-javascript@yahoogroups.com, "dvidluca" <dvidluca@...>
        wrote:
        >
        > Hi,
        >
        > is there a bug with the removeChildren method of the TreeView
        control?
        >
        > I have a tree which features some normal nodes and one dynamic
        parent
        > node. I have subscribed to the collapse event and can succesfully
        > produce an alert when the dynamic parent node is collapsed, but
        when I
        > try to reset the node with tree.removeChildren(nodeToReset) I get a
        > stack overflow message.
        >
        > I have managed to get some code together that
        > removes the dynamic children when one of the non-dynamic parent
        nodes
        > is collapsed (provided the dynamic parent has been expanded) but of
        > course this is not what I need :)
        >
        > Does anyone know whether this is a bug (I have searched the
        bugbase)
        > or how the method should be used correctly?
        >
        > Thanks
        >
      • Adam Moore
        ... The fact that calling removeChildren() during the collapse event causes a stack overflow is a bug. However, you can use the collapseComplete event
        Message 3 of 3 , May 29, 2007
          On Fri, May 25, 2007 at 03:48:38PM -0000, dvidluca wrote:
          > Hi,
          >
          > is there a bug with the removeChildren method of the TreeView control?
          >
          > I have a tree which features some normal nodes and one dynamic parent
          > node. I have subscribed to the collapse event and can succesfully
          > produce an alert when the dynamic parent node is collapsed, but when I
          > try to reset the node with tree.removeChildren(nodeToReset) I get a
          > stack overflow message.

          The fact that calling removeChildren() during the "collapse" event causes
          a stack overflow is a bug. However, you can use the "collapseComplete"
          event instead.

          -Adam
        Your message has been successfully submitted and would be delivered to recipients shortly.