LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tree control not usable?

I am programming with a tree control -- I have found 3 big problems:

a)  When I delete all tree items, the "DispItems" property reflects the items as they were before the deletions.  To me that appears to be a bug.

b)  I found I couldn't pass the tree control to a sub VI (and retain the information contained) the way I can pass ALL other controls to sub VIs, it seems I can only pass the reference -- is that another NI "feature" for the tree control?

c)  Why is there a "DispItems" but no "Items" property, shouldn't programmers have access to the items without having to expand the tree?

I realize this is a new control, is this control ready for primetime?  It seems more methods and properties should be made available for this control.

   ...Dan


0 Kudos
Message 1 of 11
(3,380 Views)

What version of LV are you using? I have code where I pass references to a tree control to subVIs all the time without problem. And yes, I would agree that the interface still needs work...

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 11
(3,363 Views)
Thanks for the response -- I'm using version 7.0.  Anyway, when I pass the reference, the methods and properties work fine (as limited as they are) but when I try to pass the control itself (so as to not mess with the data in the main VI), no information passes.

   ...Dan
0 Kudos
Message 3 of 11
(3,353 Views)
That's because the value of the control is a string, not the entire tree, in the same way that a value for a ring is the number you selected and not the entire ring data. This could probably be solved by the same Items[] property you mentioned (which doesn't exist).

___________________
Try to take over the world!
0 Kudos
Message 4 of 11
(3,350 Views)
Yes,  I know that.  The value of a ring or table is an integer, but when they are passed to a sub VI you have ALL the properties available to work with -- the same as if you're working in the main VI.

   ...Dan
0 Kudos
Message 5 of 11
(3,346 Views)
Yes, but those properties are for the ring control in the subVI, not the one in the main VI. Only the numeric value is passed when you wire the ring, not the properties of the ring. 
In the same way, if you have a tree control as an input in a subVI, you can get the properties for that control and the properties will be the same properties you have in the main VI. In that sense, LV is consistent.
The problem is that the tree control doesn't have all the properties you need.

___________________
Try to take over the world!
0 Kudos
Message 6 of 11
(3,336 Views)
TST;

Thanks, you're right on all counts.

Someone at NI does need to look at the "DispItems" property after deleting all the items in the tree control, to me it really looks like a bug.

   ...Dan
0 Kudos
Message 7 of 11
(3,331 Views)

Can you post an example of this?

I tried in 7.0 and in all cases (selecting the Delete All Items option, selecting Delete Item for each item or using the delete button to delete the text) it worked OK. In the first 2 cases I got an empty array and in the third I got an array of numbers (which seems to be the default for an empty string).


___________________
Try to take over the world!
0 Kudos
Message 8 of 11
(3,329 Views)
TST;

Thanks for looking at it -- I found that when I pasted the tree into a new VI, the behavior was as you described, it's only when running within my large application that it doesn't work.

I'd post my whole app, but to run properly, it needs the MySQL DLL, a DLL I wrote and a SQL DB structure in place (as well as Windows Registry entries and configuration files).  It's not so complicated that you wouldn't be able to jury rig it -- but unless you're paid by NI, I don't see it as worthwhile.

   ...Dan

BTW:  I've got an install disk that sets everything up, I think it's 30 MEG.
0 Kudos
Message 9 of 11
(3,320 Views)
Just for giggles, I'm posting the app, maybe the broken code could be deleted to demonstrate.

   ...Dan
0 Kudos
Message 10 of 11
(3,319 Views)