11-23-2009 11:50 AM
Hello,
I have a client application which reads several string of different length sent by the server. I have a String combo-box which displays the strings sent. The Server sends string such as: 6Hello1, 6Hello2, 6Hello3 (6 is length of the string)etc.
1. At the client side, once I receive the Hello1, I then get an empty string "" followed by Hello2 and then again an empty string "" followed by Hello3 and so on. I do not understand why am I receiveing an empty string each time.
2. Also, my String combo-box Indicator on the front pannel does not show the list of the strings received. When Hello1 is received it is displayed on the String combo-box, which then disappears(my guess is because a "" is received) and then Hello2 is received which is seen on the String combo-box which again disappears and so on. I am not able to see all the received string in the Combobox.
Regards,
-H
11-23-2009 12:33 PM
11-23-2009 12:37 PM
by chance is your sending side sending a terminator character too (like LF or CRLF or such)? These could have been introduced when creating your outgoing strings depending on how you did it.
Without seeing the sending side I cannot be sure. When viewing the outgoing string, set the string display for / displays, this way you can see any non-printing characters. You can use the trimwhitespace function in the string pallette to get ridof them depending on what they are.
11-23-2009 04:04 PM - edited 11-23-2009 04:06 PM
re #2:
it sounds like you are updating the value of the combobox with each new string.
a combobox has a string-type value and an array of strings which are items for the ring/enum behavior of the combobox. When you update the value, you just overwrite the last value you assigned to the control. These aren't beinng aded to the list of options.
you need to access the properties of the control with a property node and add each string to the array.