Opened 11 years ago

Closed 11 years ago

#7806 closed defect (wontfix)

tree is still not backwards compatible with 1.0

Reported by: Karl Tiedt Owned by:
Priority: high Milestone: 1.3
Component: Dijit Version: 1.2beta
Keywords: Cc: dante
Blocked By: Blocking:

Description

tree.getChildren() does not exist in 1.1+ Dojo... this was pushed into tree.rootNode.getChildren() a simple mapping back should suffice but I would recommend actually keeping tree.getChildren since it makes sense there...

Change History (2)

comment:1 Changed 11 years ago by bill

In 1.0 Tree had a getChildren() method inherited from TreeNode. It wasn't meant to be used externally, but it was there.

With the 1.1 refactor, Tree no longer inherits from TreeNode, thus the change in API. There are actually lots of changes along this line. For example, Tree.expand()/contract() are no longer there.

As you said above, users can get what they want by doing Tree.rootNode and Tree.rootNode.getChildren().

So, I'm tempted to close this as wontFix, especially given that the code has been this way since 1.1.

If we did add it I think the correct code would be

	getChildren: function(){
		return this.showRoot ? [this.rootNode] : this.rootNode.getChildren();
	}

although I have mixed feelings about whether or not the rootNode should be returned even when it's hidden.

comment:2 Changed 11 years ago by bill

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.