Listbox Addrow problem

No nap for me this afternoon, but when reading the answers in this Conversation, something comes back to my mind: a bug of mine…

Answer #1:
In a Listbox, I change the number of Columns at Insert time, then add some row(s), and a following addition (Paste) I noticed a miss in the number of columns. I added some columns and my data went back.

Answer #2:
If in your data (the data you want to Paste) you have an EndOfLine (Return, LF, Enter, whatever), you will not be able to watch anything but an empty line.
To check that, set your Listbox to all columns Editable(s) by a simple click (or a DoubleClick), and try to edit one of the “empty Cells”, place the cursor at the end of the Cell contents, then press the Delete key and watch carefully what happens…

Of coure, Tim is right: it is not easy to make diagnostics without seeing the project.

Back to the number of columns: when you change the number of columns of a Listbox, you do not delete the contents of the Listbox, you only display that amount of columns; if you change the number of colums back to the original number, you get your previous data back on display. (provided you do not delete the previous Rows / close the window, etc.

I was able to create a test app that shows the problem and created a FB report.

<https://xojo.com/issue/54571>

[quote=420109:@Emile Schwarz]No nap for me this afternoon, but when reading the answers in this Conversation, something comes back to my mind: a bug of mine…

Answer #1:
In a Listbox, I change the number of Columns at Insert time, then add some row(s), and a following addition (Paste) I noticed a miss in the number of columns. I added some columns and my data went back.

Answer #2:
If in your data (the data you want to Paste) you have an EndOfLine (Return, LF, Enter, whatever), you will not be able to watch anything but an empty line.
To check that, set your Listbox to all columns Editable(s) by a simple click (or a DoubleClick), and try to edit one of the “empty Cells”, place the cursor at the end of the Cell contents, then press the Delete key and watch carefully what happens…

Of coure, Tim is right: it is not easy to make diagnostics without seeing the project.

Back to the number of columns: when you change the number of columns of a Listbox, you do not delete the contents of the Listbox, you only display that amount of columns; if you change the number of colums back to the original number, you get your previous data back on display. (provided you do not delete the previous Rows / close the window, etc.[/quote]
Both of these scenarios are interesting but I am not doing anything to the column counts and none of the data is multiline.

No, I haven’t but since the data is correct and intact in the array just before the addRow, I don’t see how they apply. (I may be wrong, of course.)

We ruled out a bizarre Xojo.Net.HTTPSocket bug when your literal AddRow test failed.
(but yes, it can happen, the newer sockets are super unstable)

Sorry Dale, it seems that I skipped some lines in the original question.

Did you try with the new (replacing) Xojo 2018r4 instruction (forgot the name…) I found it:

http://developer.xojo.com/URLConnection

?

Unfortunately, I do not have my Lenovo (no kudos for them) Windows 10 laptop to test the project (it works on El Capitan).

This is why test apps are so important as its clearly a framework bug as you can force the window to paint correctly if you drag it off the screen and back on, I hadn’t even considered testing that, glad you got it narrowed down Dale,

This code works to get you out of PageReceived and away from Xojo.Net.HTTPSocket but its not really a good system as you could end up with data out of order as I believe calllater aren’t fifo in xojo (but without a test I couldn’t say for sure).

https://www.dropbox.com/s/nl1jsp0wutjzlnz/ListboxAddrowIssue2.xojo_binary_project?dl=1