LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control writing location in array, after using producer/consumer

I would like to have pull-down boxes always display their items in order. Most importantly, when I select boxes with date strings, I would like the most recent data at the top of the list. I have a series of pull-down boxes that are populated by strings, read from a 2D array of strings, for the selection of a particular data file. The boxes are handled by a producer/consumer setup that refines the search with each selection. After each selection, the order of the items in the boxes will flip. I believe that this is because after each time the array passes thru the prod/cons, what was the bottom is written to the top of the array and the what was the top is written to the bottom. For example, the first time the data is read in, the oldest string is at the top. If I make a selection, then move to select from the next box, the newest string is at the top. If I make a third selection from the next box, the oldest string is at the top again. So, with all that, does anyone have some insight on how to achieve a constant ordering scheme.

0 Kudos
Message 1 of 4
(2,716 Views)

What do you mean by pull down boxes?  Text Ring?  Menu Ring?  Enum?  Post your code so we can look at it.  The order should never change unless you code it to do so.

- tbob

Inventor of the WORM Global
Message 2 of 4
(2,709 Views)

tbob,

 I must thank you for saying the magic words "The order should never change unless you code it to do so". I have staring at my code for too long and missed the simple fact that I've already sorted in one place but not another. Also, I apologize for calling Combo boxes, pull-down boxes. I was at a loss for the proper name at the time. I realize that if I'm confused about the name of something, the people trying to help me will be, too.Smiley Tongue

0 Kudos
Message 3 of 4
(2,701 Views)

So have you fixed your problem by adding sorting code?

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 4
(2,694 Views)