LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

directory hierarchy tree control class error

Hi all,

 

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.

 

Any ideas?

 

Thanks,

Phil

0 Kudos
Message 1 of 7
(2,614 Views)

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.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(2,593 Views)

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.

0 Kudos
Message 3 of 7
(2,566 Views)

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.

 

0 Kudos
Message 4 of 7
(2,555 Views)

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.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 7
(2,553 Views)

Thanks Mike.

 

Wish I had the time to learn and practice this stuff...

Phil

0 Kudos
Message 6 of 7
(2,542 Views)
Yes, practice is the key word.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 7
(2,531 Views)