Hi,
Bit of an odd one I am reading back some data an loading it to a rich text box
using the method:
for(int i = 0; i < Max; i++)
rtbData_Back += stringParts[i] +','+'\n' ;
I have noticed some of the data missing when I change it to:
for(int i = 0; i < Max; i++)
rtbData_Back = rtbData_Back + stringParts[i] +','+'\n';
I have not seen error since. I thought += was inherited from C++/Java,
so that can't be the problem, can it?
Glenn
Loading
VulpesPosted Feb 22, 2012, 10:10 AM
rtbData_Back += stringParts[i] +','+'\n' ;
and:
rtbData_Back = rtbData_Back + stringParts[i] +','+'\n';
Also, the possibility of there being a bug in the += operator is virtually zero.
I think that when you're programming and trying to keep a lot of things in your head at once, you occasionally do get 'rogue' results which appear inexplicable at the time. However, there's always a logical explanation - perhaps you started off with a different value of rtbData_Back, you changed the max variable or you changed one or more of the elements of the stringParts array.
Glenn PattonPosted Feb 22, 2012, 10:26 AM
VulpesPosted Feb 22, 2012, 10:23 AM
The control still exists but it's invisible to the user.
Glenn PattonPosted Feb 22, 2012, 10:15 AM
Glenn (Thanks)