0 Replies Latest reply on Jan 11, 2010 8:14 AM by TomBurgundy

    HierarchicalData - function getChildren() returns null for null argument - bug?

    TomBurgundy Level 1

      Hello

       

      I just had a look at the 3.4.1 source of HierarchicalData. The getChildren() function starts like this:

       

          public function getChildren(node:Object):Object

          {

              if (node == null)

                  return null;

          ...

          }

       

      Isn't that simply wrong? The documentation for that function goes like:

       

      Returns an Object representing the node's children.

       

      Parameters

      node:Object — The Object that defines the node. If null, return a collection of top-level nodes.

      I mean, if I pass an Array of Object instances as a set of top-level elements, then of course I expect those top level elements to be returned by that function..