Trouble finding tool

I have created a custom resizing tool and added it to the mousedown tools collection and it works great.
Almost.
When I give the tool a name - say name: “myResizingTool” it breaks the functionality.
In addition, if I leave the name alone it will inherit the name “Resizing”.
Now when I want to find the tool to call a function on it I can’t find “myResizingTool” but I can get it like this:

var tool = myDiagram.toolManager.mouseDownTools._dataArray[2];//.findTool("myResizingTool");
    tool.foo(obj);

Is this an acceptable practice?
Why does naming my resizing tool break the resizing functionality?

Is there a reason you did not replace the standard ResizingTool?
$(go.Diagram, . . .,
{ . . .,
resizingTool: new CustomResizingTool()
})

Then you can refer to myDiagram.toolManager.resizingTool.

The standard resizing tool works in most cases. I have one special instance where we need a custom approach.

OK, so in your overrides you can decide whether just to call the super method or to do the special processing.

Yep. I differentiate in the override of canStart().
What am I doing wrong that I can’t name the tool though.
Do I need to tell the adornment to use that tool somehow?

The first Tool in the ToolManager.mouseDownTools list whose Tool.canStart method returns true becomes the Diagram.currentTool.

I’m concerned that if you have two ResizingTools, it might be confusing. You can make it work if you make the two Tool.canStart methods smart enough not to conflict. But it’s just easier to have a single ResizingTool, unless there are a lot of differences between the two.

If you have two of them, you should always be able to find them in the ToolManager.mouseDownTools list. Use List.elt.