LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getting names from Listbox

Solved!
Go to solution

Hi, i am making a game, where at the beginning Players write their names into a Listbox. Later in my program, i want to access those names seperatly, but i have some problems doing it. I know that i can access it with the property node and item names, but if someone changes the name at the while the program is running, the property node doesnt get the change and uses the old input. 

0 Kudos
Message 1 of 4
(2,396 Views)
Solution
Accepted by topic author Liana_superscript

Hi Liana,

 

if someone changes the name at the while the program is running, the property node doesnt get the change and uses the old input. 

This sounds like a race condition in your VI. Solution: debug your VI…

 

Why don't you keep the players name in a shift register/1D array of strings?

Why don't you disable editing of the listbox when the game is running?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,393 Views)
Solution
Accepted by topic author Liana_superscript

Gerd already gave you some great hints.

 

We probably could be even more helpful if you would attach a simplified version of your code. Whatever you are doing seems quite convoluted and I am sure it could be done much simpler.

 

Writing names directly into a listbox seems wrong. Create a dialog to add names to the listbox (and internal name array) instead.

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

Thank you, you are probably right, that Llistbox isnt the right thing to use for what i want. Since i was new to LabVIEW, i took the first Thing that i found 🙂 i am gonna look for this Dialog box thanks again

0 Kudos
Message 4 of 4
(2,309 Views)