Listview selection error

hi , this error
b1
with
blocks(11)

Are you sure that error comes from this block? Tested on companion and could not replicate error

2 Likes

with this block

On screen initialize gives error

But I believe it is because selection needs some time, so I added a clock, set time interval to 100ms and no error

2 Likes

thank you so much

1 Like

I believe this is a bug!

image

3 Likes

If the list is long, the same problem comes back even with the timer

b1

1 Like

Set the timer interval to 1000ms (1 second), and try again.

1 Like

The same thing happens with a timer interval in 1000 ms

I have this same error message appearing randomly in my app too. It started a few days ago when I built the app in the test environment and now it happens with 188 (with companion 2.62u). I was previously having the text filter problem with a list view - which has now disappeared in both live and test - but its left this nasty behind.

1 Like

Dear, with the new update of the listview, do the test again, but when I enter the screen I get this error, does anyone know what it could be?

Attempt to invoke virtual method void androidx.cardview.widget.CardView.set BackgroundColor(int) on a null object reference

Thank you

1 Like

Looking into this.

2 Likes

OK, it appears that when SelectionIndex is called in screen initialize event, the CardView objects have not been loaded into the ListView yet.

This could also happen if the SelectionIndex is set using blocks when the element being selected is not displayed on the device screen.

I am submitting a fix. I'm not sure what the timing of the release will be. Until then, in most cases the selection should work on a later event.

6 Likes

@Susan_Lane

Restart only works the first time.

Borrar_Elemento_Lista.aia (2.5 KB)

1 Like

What behavior do you expect, and what are you observing?

When click the btn_restart, the lista_numbers is loaded into the ListView.
When click btn_remove, I delete the selected element.

When click the btn_restart again, the lista_numbers doesn't load in the ListView, I was expecting it to load.

(Tested in MIT Companion 2.62 and installed)

2 Likes

Don't know when can get the latest update ?

1 Like

Getting the same error with listview after compiling to apk.

Screenshot_20211119-211213

1 Like

Another error

Screenshot_20211119-210836

1 Like

I think there are multiple issues being reported on this thread, and I'm having trouble sorting them.

@Juan_Antonio has posted a project that is giving unexpected results, and they believe it is an issue with the Refresh block. Correct?

@albert_choong has posted a screenshot of an index error in setBackgroundColor. Can you provide me blocks or a project where this occurs?

1 Like