lraynal Posted January 4, 2007 Report Share Posted January 4, 2007 For those who like to resolve strange bugs... Here attached is a library where the main VI contains a Tree. The "bug" is quite simple, I create a Tree with Cycles and SubFolders. Each Cycle has a number of executions (written in the Tag and the Item of the Tree. Example "Cycle A - 5 executions"). Select a CYCLE, then change the number of executions (via the numeric control). When the value reach 1, the Selection (of the ligne) is lost... It's only when the value is above 2 that the Selection is kept! I would be really happy if some of you would like to put an eye over this problem! Thanks in advance. Laurent Download File:post-6600-1167924107.llb Quote Link to comment
Darren Posted January 4, 2007 Report Share Posted January 4, 2007 The string you're generating for the Value of the tree is incorrect. When the value goes down to 1, the text you display in the tree is "Cycle A - 1 execution", but if you probe the string you're wiring into the Value property, it is "Cycle A - 1 executions". Since this is not a valid tree tag, no line is selected. Also, I would recommend keeping an array of the tag names assigned to each row in the tree, and changing the Cell text for a row as it's changed, instead of re-writing the entire contents of the tree every time the number for a single row is changed. -D Quote Link to comment
lraynal Posted January 4, 2007 Author Report Share Posted January 4, 2007 The string you're generating for the Value of the tree is incorrect. When the value goes down to 1, the text you display in the tree is "Cycle A - 1 execution", but if you probe the string you're wiring into the Value property, it is "Cycle A - 1 executions". Since this is not a valid tree tag, no line is selected.Also, I would recommend keeping an array of the tag names assigned to each row in the tree, and changing the Cell text for a row as it's changed, instead of re-writing the entire contents of the tree every time the number for a single row is changed. -D OK! Here is the bug! Nice to get a fresh mind on this kind of trouble!!! Thanks a lot. (and by the way, I've posted this "bug" to NI via the support, as well...) And thanks to the idea of keeping the array. Cheers, Laurent Quote Link to comment
Darren Posted January 4, 2007 Report Share Posted January 4, 2007 Make sure to let NI support know that it's not actually a bug, but an error in your code. -D Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.