LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TreeView control question

Hi All,

I have a tree view control, and I have registered the "Expand" event. When
I receive the event, I attempt to convert the data from the event to a
"Node" object. This seems to give me an error in the "Variant to Data"
operation.

Does anyone know what the problem is. According the documentation the data
from the event should be a Node object.

Any help is appreciated.

I have attached an example



[Attachment Tree View example.vi, see below]
0 Kudos
Message 1 of 3
(2,575 Views)
Variant coercion is forgiving, to a flaw. You tried to convert an array of ParamData (variants) to a refnum. Thick purple wires look like regular purple wires and they all wire up (coerce to variant), OK. But you should have indexed out the variant of interest and then converted to LabVIEW data. I have attached a working example. Don't feel bad. This one gets me all the time... dam_n those purple wires ;-)...

Good luck,

-Jim
Message 2 of 3
(2,575 Views)
Thanks for your help Jim

Sometimes it helps to have a second set of eyes look at things


"Jim Kring" wrote in message
news:50650000000500000009D40000-1042324653000@exchange.ni.com...
> Variant coercion is forgiving, to a flaw. You tried to convert an
> array of ParamData (variants) to a refnum. Thick purple wires look
> like regular purple wires and they all wire up (coerce to variant),
> OK. But you should have indexed out the variant of interest and then
> converted to LabVIEW data. I have attached a working example. Don't
> feel bad. This one gets me all the time... dam_n those purple wires
> ;-)...
>
> Good luck,
>
> -Jim
0 Kudos
Message 3 of 3
(2,575 Views)