LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

setting Strings[] property of empty ring array creates first element

Title says it all. To me, it looks as a bug (or am I missing the logic?). I am on LV8.5 linux, but remember having seen such things with earlier versions and on windows too.
I attach a very simple test snippet. "Array of rings" has initially size 0, I don't understand why after writing the property it grows to size 1.
Any ideas?
Thanks, Enrico

Download All
0 Kudos
Message 1 of 10
(3,478 Views)

Hi Enrico,

i see no problem. First you set the size to zero, and then you set the value of one array element. I think it is ok i think it´s no bug. Smiley Happy Wherefore do you need it?

Mike



Message Edited by MikeS81 on 04-03-2008 12:57 PM
0 Kudos
Message 2 of 10
(3,463 Views)
But I'm not setting a value! I am setting only the item description strings, and IMHO that should not create any array element. If the array was already populated, no new element would be created.
The obvious workaround is to restore the original array content after having set the property, like in the attached, but the fact that this is needed for an empty array and superfluous otherwise makes me think of a bug.
Enrico
0 Kudos
Message 3 of 10
(3,456 Views)
Hi Enrico,

I have modified your code by swapping 3rd sequence with 1st sequence.
Another work around would be to create the text ring control>>right click>>edit items>>then add it to the array

I will look into this more.

Hope these work arounds help




Message Edited by Van_L on 04-04-2008 01:41 PM
Van L
NI Applications Engineer
Download All
Message 4 of 10
(3,416 Views)

This is a bug.  We should not allocate array elements for setting properties (other than value) on the element DDO.  I could not find a request for this bug, so I filed one: CAR #101612

Thanks

Jeff Peters

LV R & D

Message 5 of 10
(3,399 Views)
aha, that was my point, not which workaround is shorter. Thanks for filing the bug entry for me, I'm not familiar with the LV tracker.
Enrico
0 Kudos
Message 6 of 10
(3,370 Views)
Has this bug been fixed in LV8.6? I'm still using LV8.5, where the bug was found.
0 Kudos
Message 7 of 10
(3,031 Views)
I just wanted to add that this bug does not occur when you update the Strings And Values[] property, just the Strings[] property. That was my workaround for now.
0 Kudos
Message 8 of 10
(3,025 Views)

Sima,

 

A list of bug fixes for 8.6 is found in the LabVIEW 8.6 Bug Fixes document, searchable from the ni.com homepage.  Look in there for the CAR# previously filed and referenced in the above post and you will find your answer Smiley Happy

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
Message 9 of 10
(2,992 Views)
Doh! Thanks!
0 Kudos
Message 10 of 10
(2,982 Views)