I'm having some trouble with the VIs HERE. The tree control works until I change features such as the control selection mode, at which point I get a broken wire from the tree reference into NEW Directory to Tree.vi. Context help says it's a class conflict but I have no idea how to resolve it.
I can't look at your code right now, but my suspicion is that when you change the selection mode it has the effect of changing the control's data type -- which would also change the class of the references to control. Hence the broken wires.
That's true, Mike. It is a datatype problem, and I seem to have resolved half of the problem by deselecting 'Include data type' and adding a new output reference in directory to tree.vi (Include Datatype is not selected). I now have a coercion dot on the dir 2 tree VI icon in the top level VI. There still remains a data type problem with the NEW traverse and add.vi though. Can't find a way to resolve all class conflicts through the two VIs.
OK I've resolved this, although I don't feel like I've learned much in doing so.
In directory to tree.vi I replaced a few of the refnums with copies of one I knew worked with the new datatype after the change to '0 or more items' in selection mode. I tried selecting and deselecting 'Include datatype' for the refnum and took the one that worked, deselecting worked. The tree control reference gave a coercion dot in the calling VI. Invoke nodes became non-strict as this happened. Not sure why.
In Traverse and Add.vi I did the same, but as it's recursive I had to save the the file and re-assign the type-specifier VI refnum. Invoke nodes became non-strict again.
In each VI I made sure the new Refnum control and indicators were connected on the connector pane.
Now it works.
The lesson is that if you change the datatype of a control for which you are passing a reference into a subVI, you need to recreate the controls that the reference will be passing through.